Commit 9f357292 by 邓丽

formSubmit

parent ed2f65a2
......@@ -67,9 +67,11 @@
</section>
<section>
<div class="search">
<form action="">
<span>
<input type="search" placeholder="搜索"/><a><i></i></a>
<input type="search" placeholder="搜索" id="searchContent"/><a id="searchBtn"><i></i></a>
</span>
</form>
</div>
<div class="searchContent">
<!--引入遮罩图片列表-->
......@@ -278,6 +280,13 @@
});
})
/*搜索按钮提交表单*/
function searchWords(obj){
$(obj).parents("form").submit();
}
$("#searchBtn").click(function(){
searchWords(this);
})
</script>
</body>
......
......@@ -43,9 +43,11 @@
</section>
<section>
<div class="search">
<form action="">
<span>
<input type="search" placeholder="搜索"/><a><i></i></a>
<input type="search" placeholder="搜索" id="searchContent"/><a id="searchBtn"><i></i></a>
</span>
</form>
</div>
<div class="searchContent">
<!--引入遮罩图片列表-->
......@@ -89,6 +91,13 @@
});
})
/*搜索按钮提交表单*/
function searchWords(obj){
$(obj).parents("form").submit();
}
$("#searchBtn").click(function(){
searchWords(this);
})
</script>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment