i have a form in wich i have several input... one of them should be a number input type.
i use this code to get only numeric input in a input type.
<script type="text/javascript">
function isNumberKey(evt){
var charCode = (evt.which) ? evt.which : event.keyCode
if ((charCode > 31) && (charCode < 48 || charCode > 57))
return false;
return true;
}
</script>
but i need another features that i still not able to "create"...
i have an input type (example : ) and onkeyup event i call this function (isNumberKey - allowing only numeric input). in case the number wrote is composed by 4 or more numbers i'd like to return (on the same input) the string with the dot notation every 3 number... ex. 900->900 but 1234 -> 1.234 or 15000 -> 15.000.