<input type="text" name="fname" onkeypress="return false;"
onkeydown="doCheck();" onpaste="return false;"/>
And here is the doCheck() function:
function doCheck() {
var keyCode = (event.which) ? event.which : event.keyCode;
if ((keyCode == 8) || (keyCode == 46) )
event.returnValue = false;
}
|