Thursday, August 13, 2009

Javascript event anywhere on page calls function

document.onkeypress = stopRKey;
function stopRKey(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
if ((evt.keyCode == 13)) {
return false;
}
}
//not sure how javascript knows what "evt" is but it does.

0 Comments:

Post a Comment

<< Home