任何人都可以帮助我,为什么自动填充功能在首次使用后不起作用
我的代码在这里
$(document).on("keydown", "#ContentPlaceHolder1_TxtBookName", function (e) {
if (e.which == 38) {
var editMode = $("#ContentPlaceHolder1_hdnEdit");
if (editMode.val() != "true") {
var submit = $("#ContentPlaceHolder1_BtnSubmit").attr("disabled");
var add = $("#ContentPlaceHolder1_Btnadd").attr("disabled");
var cancel = $("#ContentPlaceHolder1_BtnCancel").attr("disabled");
if (submit == undefined && add == "disabled" && cancel == undefined) {
$(ContentPlaceHolder1_txtBookCode2).val(null);
$(ContentPlaceHolder1_txtBookType).val(null); $(ContentPlaceHolder1_txtBookCode2).removeAttr("disabled");
$(ContentPlaceHolder1_txtBookType).attr("disabled", "disabled");
$(ContentPlaceHolder1_txtBookCode2).focus();
}
}
}
});