Hiii,
I want to accept only Number i.e integer values in my textbox .
It only accepts numner not '.' or any letter in it.
have seen this on our forum :
It accepts both number and '.' also i want only numbers.
<script type="text/javascript">
function onlyNumbersWithDot(e) {
var charCode;
if (e.keyCode > 0) {
charCode = e.which || e.keyCode;
}
else if (typeof (e.charCode) != "undefined") {
charCode = e.which || e.keyCode;
}
if (charCode == 46)
return true
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
</script>