思路:一个jsp页面接收到上一个jsp页面的表单,再加上自身的表单,两个表单传向下一个jsp页面。两个表单也可以整理成一个表单,然后传递到下一个表单。
由于页面较多,考虑的是将所有表单依次传递,到最后一个页面然后再一起提交到后台,但是传递过程中永远只传递到了上一个页面的表单,本人小白,求教如何实现这样的功能。
a.jsp
<form method="post" id="survey" name="survey" action="timesOfjoin.jsp">
...
<div id="action" method="post"
style="text-align:center;margin:0 auto;">
<button id="survey_submit" type="button"
onclick="document.getElementById('survey').submit();"
style="padding:4px;text-align:center;font-size:16px; ">下一页</button>
timeOfjoin.jsp
<form method="post" id="survey" name="survey" action="workIndustry.jsp">
...
<div id="action" style="text-align:center;margin:0 auto;">
<button id="survey_submit" type="button"
onclick="document.getElementById('survey').submit();"
style="padding:4px;text-align:center;font-size:16px; ">下一页</button>
workIndustry.jsp
<form method="post" id="survey" action="areaIninterest.jsp">
...
<div id="action" style="text-align:center;margin:0 auto;">
<button id="survey_submit" type="button"
onclick="document.getElementById('survey').submit();"
style="padding:4px;text-align:center;font-size:16px; ">下一页</button>
</div>