Monday, July 26, 2004

How to prevent Page being submitted when Enter key is pressed.

Call This Function in onKeyPress event of any control.
function onKey()
if ((event.which && event.which == 13) (event.keyCode &&
event.keyCode == 13))
{;return false;}
else return true;

 for more detail you can go through with

For All Page document.onkeypress = function(){return event.keyCode!=13;};


No comments: