0
I wanted to know how I limit the maximum number before and after the point.
Like, make it 3 numbers before the dot and 2 numbers after. How do I do this?
Code:
<script>
function soma()
{
form.campo4.value = parseInt(form.campo1.value*1) * parseInt(form.campo2.value*1)
}
</script>
<script type="text/javascript">
$(function(){
$("#demo4").maskMoney({symbol:'R$ ',
showSymbol:true, thousands:'', decimal:'.', symbolStay: false});
})
$(function() {
$(document).on('click', 'input[value][id=demo4]', function() {
this.select();
});
});
$("#demo4").bind('input propertychange', function(){
if($(this).val() > 4){
$(this).val() = 4;
}else if($(this).val() < 1){
$(this).val() = 1;
}
});
</script>
See the answer. If you enable "R$", you need to limit the field to 9 characters.
– Sam
Dvdsamm as I do to put so in the input that I will put the value I want when typing the value from 1 to 99 ]
– André Junior