日期:2014-05-17  浏览次数:20775 次

如何同时提交两个表单??高手帮忙
如下:我想让在提交表单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 "
这样试一下。