[Web-development (jquery)] Javascript allow only numbers to be entered in a textbox

Javascript allow only numbers to be entered in a textbox
Javascript allow only numbers to be entered in a textbox
 <HTML> <HEAD> <SCRIPT language=Javascript> function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } </SCRIPT> </HEAD> <BODY> <INPUT onkeypress="return isNumberKey(event)" type="text" name="txtChar"> </BODY> </HTML> 

source : http://wikipedia.org, http://tutorial101.blogspot.com, http://youtube.com

0 Response to "[Web-development (jquery)] Javascript allow only numbers to be entered in a textbox"

Post a Comment

Contact

Name

Email *

Message *