当前位置: 代码迷 >> ASP >> 怎么同时提交两个表单?高手帮忙
  详细解决方案

怎么同时提交两个表单?高手帮忙

热度:451   发布时间:2012-02-05 12:07:14.0
如何同时提交两个表单??高手帮忙
如下:我想让在提交表单form2时同时提交form1,有什么办法可以实现吗?高手帮忙,万分感激!!

<form   name= "form1 "   ENCTYPE= "multipart/form-data "   ACTION= "upimage.asp "   METHOD= "POST "   target= "_blank ">  
Please   choose   a   picture   to   upload:   <br>  
<input   NAME= "picture "   TYPE= "FILE ">   <br>  
</form>  

<form   name= "form2 "   action= "uptext.asp "   method= "post ">  
    <p>
        <input   type= "text "   name= "text1 ">
        <br>  
        <input   type= "text "   name= "text2 ">
        <br>  
        <input   type= "submit "   value= "提交 ">  
    </p>
</form>  


------解决方案--------------------
给form2里加上onsubmit= "document.getElementById( 'form1 ').submit(); "
form1里要加上id= "form1 "
这样试一下。
  相关解决方案