Created
April 3, 2014 18:12
-
-
Save Villanuevand/9959693 to your computer and use it in GitHub Desktop.
Una pequeña función Js, para, como su nombre lo dice evitar se presione la tecla "Enter"
This file contains 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
function evitarEnter(event) { | |
var event = (event) ? event : ((event) ? event : null); | |
var node = (event.target) ? event.target : ((event.srcElement) ? event.srcElement : null); | |
if ((event.keyCode == 13) && (node.type == "text")) { | |
alert('Enter Desactivado'); | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment