function checkIsNaN(e){
var unicode=e.charCode? e.charCode : e.keyCode
if (unicode!=8){
if (unicode<48||unicode>57)
return false //disable key press
}
}
call this method in
onkeypress="return checkIsNaN(event)"
Subscribe to:
Post Comments (Atom)
2 comments:
Thank you for posting this.It helped me learn something new today
thanx for you comment
Post a Comment