document.forms[0].submit;
这个语句写在哪里能实现这个form的自动提交?

解决方案 »

  1.   

    <form></form>
    document.forms[0].submit;
      

  2.   

     <form id="allowSearch" name="allowSearch" action="http://jdyjhx.mofcom.gov.cn/manager/allowSearch!list.do" method="post">
         <input type="hidden" name="is_show" value="1" id="allowSearch_is_show"/>
          <table width="100%" cellpadding="5" cellspacing="1" class="tbl_list_r">
            <tr>
              <th width="16%">请输入编号:</th>
              <td width="84%"><input type="text" name="bean._vCode" size="25" value="NYHXJMPQUB0111422825" id="allowSearch_bean__vCode" class="webinput"/>        
                 <input name="button" type="submit" class="websub" id="button" value="查 询" />
               </td>
            </tr>       
          </table>
          </form>
     <script type="text/javascript"> 
        document.forms[0].submit;
     
    </script>我怎么没提交呢?
      

  3.   

    document.forms[0].submit();加个括号
      

  4.   

    window.onload=function(){document.forms[0].submit();
    };
      

  5.   

    head区也可以
    window.onload=function(){document.forms[0].submit();}
      

  6.   

    奇怪,提交了报错。
    但是点击那个submit就没错。