如何把一个页面的表单值提交到不同的页面中去,比如A页面有一个表单,要把其中的数据分别传到B和C页面中去,做分别处理??

解决方案 »

  1.   

    分别提交到两个新的窗口去.
    即提交一次后,更改它的action并且更改target然后再自动提交一次。
      

  2.   

    对,可以用JS的location.href来提交
      

  3.   

    HTML文件中:
    <html>
        <head>
          <title>test</title>
        <script language="JavaScript">
        function jump01()
        {
          document.form.action="test01.php";
        }
        function jump02()
        {
          document.form.action="test02.php";
        }
        </script>
        </head>
        <body>
           <form name="form" id="form" method="POST">
            姓名:<input type="text" name="text">
            <input type="button" name="btn1" onclick="jump01()">   //会提交到test01.php文件中
            <input type="button" name="btn2" onclick="jump02()">   //会提交到test02.php文件中
           </form>
        </body>
    </html>
      

  4.   

    如果是只用一个按钮,同时递交到两个php文件,如何实现?
      

  5.   

        function jump01() 
        { 
          document.form.action="test01.php"; 
          document.form.action="test02.php"; 
        }