Jump to content

RegExp in JavaScript


Recommended Posts

I wont when i put 1:30 for exampleresult to be 1:30 this function not allow to ":"-this character Please help me !function noLett(e){ var keynum; var keychar; var numcheck; if(window.event) // IE { keynum = e.keyCode; } else if(e.which) // Netscape/Firefox/Opera { keynum = e.which; } if (keynum !=8){ keychar = String.fromCharCode(keynum); numcheck = /\d/ return numcheck.test(keychar); } }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...