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>");
}
%>
摘自 黎明