搜索框为空时阻止搜索

This commit is contained in:
底层用户 2022-08-19 14:13:17 +08:00
parent 6f48c6ed2d
commit 35ba36660a

View File

@ -143,7 +143,9 @@ $(window).keydown(function (e) {
//点击搜索按钮
$(".sou-button").click(function () {
if ($("body").attr("class") === "onsearch") {
$("#search-submit").click();
if ($(".wd").val() != "") {
$("#search-submit").click();
}
}
});