kedarhukeri
Programmer
Dear Friends,
I have following script which works for IE5.0 but it's not working in Netscape5.0onwards.
Can anyone help me /suggest alternate approch?
*************************
<SCRIPT LANGUAGE="Javascript">
function numberCheck()
{
if (event.keyCode < 48 || event.keyCode > 57)
{
event.returnValue = false;
alert('NUMBERS ONLY');
}
else
{
event.returnValue = true;
}
}
</SCRIPT>
<BODY>
<INPUT TYPE="TEXT" onKeyPress="numberCheck();">
</BODY>
I have following script which works for IE5.0 but it's not working in Netscape5.0onwards.
Can anyone help me /suggest alternate approch?
*************************
<SCRIPT LANGUAGE="Javascript">
function numberCheck()
{
if (event.keyCode < 48 || event.keyCode > 57)
{
event.returnValue = false;
alert('NUMBERS ONLY');
}
else
{
event.returnValue = true;
}
}
</SCRIPT>
<BODY>
<INPUT TYPE="TEXT" onKeyPress="numberCheck();">
</BODY>