<input type="number" name="quantity" min="0" max="100" #weightCQ="ngModel" style="width:80px" placeholder="Weightage" [(ngModel)]="weightage[j]">
Here the input should not take a value more than 100
<input type="number" name="quantity" min="0" max="100" #weightCQ="ngModel" style="width:80px" placeholder="Weightage" [(ngModel)]="weightage[j]">
Here the input should not take a value more than 100
You can do this with jquery
$('#100').keyup(function(){
if($('#100').val() > 100) {
$('#100').val(100);
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="number" name="quantity" id="100" min="0" max="100" #weightCQ="ngModel" style="width:80px" placeholder="Weightage" [(ngModel)]="weightage[j]">