Trigger submit button on enter key press from textbox
$(function(){
$('#textbox').keypress(function (e) {
var key = e.which;
if (key == 13) // the enter key code
{
$('#submit').click();
return false;
}
});
});
$('#textbox').keypress(function (e) {
var key = e.which;
if (key == 13) // the enter key code
{
$('#submit').click();
return false;
}
});
});
Comments
Post a Comment