jsp表单提交数组
jsp表单提交数组
<body>
<form name="form1" method="post" action="">
<p>
<input type="checkbox" name="aaa" value="a1">
a1
<input type="checkbox" name="aaa" value="a2">
a2
<input type="checkbox" name="aaa" value="a3">
a3
<input type="submit" name="Submit" value="Submit">
</form>
<hr>
<%
String[] aaa=request.getParameterValues("aaa");
for(int i=0;i<aaa.length;i++){
out.print(aaa[i]+"<br>");
}
%>