<form id="search_form" name="search_form" method="post"> <input type="text" name="username" /> </form>
<script type="text/javascript"> $(function() { $(‘#btn‘).bind(‘click‘, function() { document.search_form.action = ‘admin/queryAll.do?pid=‘ + pid; //定义 action,并传参 $(‘#search_form‘).submit(); }); }) </script>
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/itmyhome1990/article/details/46900299