Tuesday, September 18, 2007

Restrict Alphabet Input In TextBox

<script language="javascript">
function blockChar(e)
var keyVal =(window.event) ? event.keyCode : e.keyCode;
if (window.event) keyVal = window.event.keyCode;
if((keyVal > 64 && keyVal < 93))
return false;
<body onload="javascript:document.getElementById('txt').focus();">
<input type="text" id='txt' onkeydown="return blockChar(this);" />

Program Demo

No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.