单击submit
时,我调用此函数:
function submitFunction()
{
document.forms[0].action = "Result.jsp";
document.forms[0].method = 'GET';
document.forms[0].submit();
}
中的数据Result.jsp
是:
<%
out.println(request.getparameter("demo1")+"<BR>");
out.println(request.getparameter("demo2")+"<BR>");
out.println(request.getparameter("demo3")+"<BR>");
out.println(request.getParameter("demo4")+"<BR>");
out.println(request.getParameter("demo5")+"<BR>");
out.println(request.getParameter("demo6")+"<BR>");
%>
我的表格:
<form method="post" action="Result.jsp" >
<h1>Student Info</h1>
<hr>
<pre>
<b>Name</b> :<input id="demo1" type="text" value=" "/>
</pre>
<pre>
<b>Age </b> :<input id="demo2" type="text" value=" "/>
</pre>
<pre>
<b>Qualification</b> :<input id="demo3" type=isNaN value=" "/>
</pre>
<pre>
<b>Address</b> :<input id="demo4" type="text" value=" "/>
</pre>
<pre>
<b>Company Name</b> :<input id="demo5" type="text" value=" "/>
</pre>
<pre>
<b>Height</b> :<input id="demo6" type="numeric" value=" " />
</pre>
</form>
请为此提出解决方案