function checkSubmit(obj) { if ($("#ddlProvince").val() == "-1" && $("#ddlCity").val() == "-1" && $("#searchother").val() == "") { alert("请输入搜索条件"); return false; } else { $(obj).attr("href", "search.aspx?Province=" + $("#ddlProvince").val() + "&City=" + $("#ddlCity").val() + "&other=" + escape($("#searchother").val())); $(obj).click(); return true; } }