I wanted to know how I limit the maximum number before and after the point.
Type, that are 3 numbers before the point and 2 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>