function onkeypressed(e) {
var keyCode = (window.event) ? window.event.keyCode : e.which;
if (keyCode == 13) {
// do something
return true;
} else {
return false;
}
}
Friday, December 04, 2009
Javascript window.event.keyCode in firefox
This is usually used for capturing the ENTER key pressed in the html text box:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment