blague Posted October 25, 2007 Share Posted October 25, 2007 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 More sharing options...
Synook Posted October 25, 2007 Share Posted October 25, 2007 The Regex for matching a string with number and/or the colon would be something like ([0-9]|:)* Link to comment Share on other sites More sharing options...
blague Posted October 25, 2007 Author Share Posted October 25, 2007 The Regex for matching a string with number and/or the colon would be something like([0-9]|:)* Thank you !!!! Link to comment Share on other sites More sharing options...
blague Posted October 25, 2007 Author Share Posted October 25, 2007 The Regex for matching a string with number and/or the colon would be something like([0-9]|:)* Thank you !!!! Link to comment Share on other sites More sharing options...
blague Posted October 25, 2007 Author Share Posted October 25, 2007 The Regex for matching a string with number and/or the colon would be something like([0-9]|:)* Thank you !!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.