form表单提交时,action怎么带参数

 1 <html>
 2 <title>formtitle>
 3 <script type="text/javascript">
 4     function test(){
 5         var f = document.getElementsByTagName("form")[0];
 6         f.action=f.action+"id="+document.getElementById("input").value;
 7         alert(f.action);
 8     }
 9 script>
10 <body>
11 <form action="ss.do?"  method="get">
12     <input type="text" id ="input"/>
13     <input type="button" value="提交" onClick="test()">
14 form >
15 body>
16 html>

 转自百度知友---zhou2003737   http://zhidao.baidu.com/question/465627004.html

转载于:https://www.cnblogs.com/heyuxiu/p/5759594.html

你可能感兴趣的:(form表单提交时,action怎么带参数)