Vivid Lust Posted January 26, 2010 Share Posted January 26, 2010 How, I'm currently using the following script: <script type="text/javascript"> <!-- function foo(e) { var allow=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_' var k; k=document.all?parseInt(e.keyCode): parseInt(e.which); return (allow.indexOf(String.fromCharCode(k))!=-1); } // --> </script> <input type="text" onKeyPress="return foo(event)" /> How can I alow delete, backspace, and disable spacebar? Thanks all!! Link to comment https://forums.phpfreaks.com/topic/189834-allow-only-english-alphabet-lettersunderscorebackspacedelete-etc-in-text-box/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.