Skip to content

Instantly share code, notes, and snippets.

@Villanuevand
Created April 3, 2014 18:12
Show Gist options
  • Save Villanuevand/9959693 to your computer and use it in GitHub Desktop.
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"
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