当我多次点击Entyer时,记录多次创建
$(document).keydown(function (e) {
debugger;
// Create receipt on press key enter
if (e.keyCode == 13) {
$("input[id='BtnCreate'").focus().click();
return false;
}
// Go back the previous page on press esc key
if (e.keyCode == 27) {
var url = $("#btnCancel").attr("href");
window.location = url;
return false;
}
});
},
答案 0 :(得分:0)
$(document).keydown(function (e) {
debugger;
// Create receipt on press key enter
if (e.keyCode == 13) {
$("input[id='BtnCreate'").focus().click();
$('#BtnCreate').off();
return false;
}
// Go back the previous page on press esc key
if (e.keyCode == 27) {
var url = $("#btnCancel").attr("href");
window.location = url;
return false;
}
});
},