一个jsp页面可以有多个form吗
推荐于2017-12-15
展开全部
可以的,直接创建多个form即可,形式就是“<form></form><form></form>”,此时每个form中的内容就是独立提交的部分。
举例:
<form id='modify1' name="modify1" method="post" enctype="multipart/form-data" action="${ctx}/report/rate_exchange.jsp" >
<table class="table_common" id="table1" cellspacing="1" cellpadding="0">
<tr class='title_tr' >
<td style="white-space: nowrap; text-align: center;" colspan="4">
<input type="file" name="fileName" id="filePath">
<input type="button" style="white-space: nowrap; text-align: center;" class="List_Button2" value="<BOC:I18N name="submit"/>" onclick="submitForm1()" />
<input type="reset" style="white-space: nowrap; text-align: center;" class="List_Button2" value="<BOC:I18N name="reset"/>" onclick='confirm("你确认要取消本次上传吗?")'/>
</td>
</tr>
</table>
</form>
<!-- end 文件上传-->
<form>
<table>
<tr class="title_tr" >
<TH width="10%" style="white-space: nowrap; text-align: center;color: red"><%=worry %></TH>
</tr>
<tr class="title_tr" >
<TH width="10%" style="white-space: nowrap; text-align: center;color: green"><SPAN><%=right %></SPAN></TH>
</tr>
</table>
</form>
举例:
<form id='modify1' name="modify1" method="post" enctype="multipart/form-data" action="${ctx}/report/rate_exchange.jsp" >
<table class="table_common" id="table1" cellspacing="1" cellpadding="0">
<tr class='title_tr' >
<td style="white-space: nowrap; text-align: center;" colspan="4">
<input type="file" name="fileName" id="filePath">
<input type="button" style="white-space: nowrap; text-align: center;" class="List_Button2" value="<BOC:I18N name="submit"/>" onclick="submitForm1()" />
<input type="reset" style="white-space: nowrap; text-align: center;" class="List_Button2" value="<BOC:I18N name="reset"/>" onclick='confirm("你确认要取消本次上传吗?")'/>
</td>
</tr>
</table>
</form>
<!-- end 文件上传-->
<form>
<table>
<tr class="title_tr" >
<TH width="10%" style="white-space: nowrap; text-align: center;color: red"><%=worry %></TH>
</tr>
<tr class="title_tr" >
<TH width="10%" style="white-space: nowrap; text-align: center;color: green"><SPAN><%=right %></SPAN></TH>
</tr>
</table>
</form>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询