How come I can't bind this to JQuery?
$("input").bind("keyup",function(e1){
if(e1.keyCode==13){
return false;
}
});
I want to return false everytim开发者_高级运维e someone pushes "enter" inside one of my text boxes.
k i tried it out this one works
$("textarea").bind("keypress", function(e) {
if (e.keyCode == 13) return false;
});
try with keycode 13 too
See jquery api
Your answer:
$('input').submit(function() {
return false;
});
精彩评论