如题,代码demo如下
<html>
 <head>
  <script>
  function test()
  {
    for(i=0;i<2;i++)
    {
        //alert(i);//如果把这个alert去掉 表单只能提交一次 而不去掉 则可以提交多次 这是//为啥呢        document.myForm.submit();
    }
  }
  </script>
 </head> <body>
 <iframe style="display:none;" name="myIframe" id="myIframe"></iframe>
 <form action="index.php" method="POST" id="myForm" name="myForm" target="myIframe">
 </form>
 <input type="button" value="test" onclick="test();">
 </body>
</html>javascript循环 提交表单循环提交表单