<divclass="search2"><label>输入名称查找:</label><inputtype="text"class="text"name="key"id="...
<div class="search2">
<label>输入名称查找:</label>
<input type="text" class="text" name="key" id="key" />
<input name="submit" id="searchbutton" value=" 搜 索 " class="btn submit" type="button">
</div>
JS:是关于这部分的JS代码
$("#searchbutton").click(function () {
page();
})
function page(){
$("#result").html("Loading");
var pars = "search2.php?a=mt_search";
if($("#key").val().length > 0)
{
pars += "&searchtext=" + $("#key").val();
}
if($("#mtdl dd.on").attr("data") != "-1")
{
pars += "&fl=" + $("#mtdl dd.on").attr("data");
}
if($("#zhmh dd.on").attr("data") != "-1")
{
pars += "&zhmh=" + $("#zhmh dd.on").attr("data");
}
if($("#fgqy dd.on").attr("data") != "-1")
{
pars += "&jg=" + $("#fgqy dd.on").attr("data");
}
if($("#mtdq dd.on").attr("data") != "-1")
{
pars += "&dq=" + $("#mtdq dd.on").attr("data");
}
if($("#mtxwy dd.on").attr("data") != "-1")
{
pars += "&xw=" + $("#mtxwy dd.on").attr("data");
}
if($("#mtlink dd.on").attr("data") != "-1")
{
pars += "&lj=" + $("#mtlink dd.on").attr("data");
}
$.get(pars, function(data){
$("#result").html(data);
$("#totalnum").html($("#totalnum2").html());
});
}
点击搜索按钮不生效是怎么回事啊能帮我看下吗 谢谢了
是JS代码问题还是那个 search2.php 代码的问题啊