<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>
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/14431.html