Created
September 9, 2019 09:33
-
-
Save Fenil265/d64fbea4229a593db01bb34ffb2461d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('foo').onkeypress = function(e){ | |
if (!e) e = window.event; | |
var keyCode = e.keyCode || e.which; | |
if (keyCode == '13'){ | |
// Enter pressed | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment