The code below is supposed to click a button
when the Enter key is pressed and empty another textbox
if any other key is clicked.
I'm unable to check the keycode
as keycode
is always undefined
.
$('#txtSearch').keyup(function (e) {
if (e.keycode != 13)
$('#txtId').val("");
else
$('#BtnGo').click();
})