Commit 9f357292 by 邓丽

formSubmit

parent ed2f65a2
...@@ -67,9 +67,11 @@ ...@@ -67,9 +67,11 @@
</section> </section>
<section> <section>
<div class="search"> <div class="search">
<form action="">
<span> <span>
<input type="search" placeholder="搜索"/><a><i></i></a> <input type="search" placeholder="搜索" id="searchContent"/><a id="searchBtn"><i></i></a>
</span> </span>
</form>
</div> </div>
<div class="searchContent"> <div class="searchContent">
<!--引入遮罩图片列表--> <!--引入遮罩图片列表-->
...@@ -278,6 +280,13 @@ ...@@ -278,6 +280,13 @@
}); });
}) })
/*搜索按钮提交表单*/
function searchWords(obj){
$(obj).parents("form").submit();
}
$("#searchBtn").click(function(){
searchWords(this);
})
</script> </script>
</body> </body>
......
...@@ -43,9 +43,11 @@ ...@@ -43,9 +43,11 @@
</section> </section>
<section> <section>
<div class="search"> <div class="search">
<form action="">
<span> <span>
<input type="search" placeholder="搜索"/><a><i></i></a> <input type="search" placeholder="搜索" id="searchContent"/><a id="searchBtn"><i></i></a>
</span> </span>
</form>
</div> </div>
<div class="searchContent"> <div class="searchContent">
<!--引入遮罩图片列表--> <!--引入遮罩图片列表-->
...@@ -89,6 +91,13 @@ ...@@ -89,6 +91,13 @@
}); });
}) })
/*搜索按钮提交表单*/
function searchWords(obj){
$(obj).parents("form").submit();
}
$("#searchBtn").click(function(){
searchWords(this);
})
</script> </script>
</body> </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