<form action="tt2.jsp" method="POST">短语
<lect name="two" multiple="multiple">
<option value="val1" lected="lected">Value 1</option>
<option value="val2" lected="lected">Value 2</option>
<option value="val3" lected="lected">Value 3</option>
<option value="val4" lected="lected">Value 4</option>
<option value="val5" lected="lected">Value 5</option>
</lect>
融资金额<input type="checkbox" name="three" value="chk1">Check 1<br/>
<input type="checkbox" name="three" value="chk2">Check 2<br/>
<input type="checkbox" name="three" value="chk3">Check 3<br/>
<input type="checkbox" name="three" value="chk4">Check 4<br/>
<input type="checkbox" name="three" value="chk5">Check 5<br/>
<input type="submit" value="Submit">
</form>
tt2.jsp
<%
世界上最大的半岛
String[] lected = ParameterValues("two");
if(lected != null){
for(int i=0; i<lected.length; i++){七下英语书单词表
课题研究计划out.write("<p>" + lected[i] + "<p>");
南京鸭血粉丝汤
}
}el{
out.write("<p> No value lected <p>");
}
String[] checked = ParameterValues("three");
if(checked != null){
for(int i=0; i<checked.length; i++){
out.write("<p>" + checked[i] + "<p>");
}晒版
}el{
out.write("<p> No value checked <p>");
}
%>
yanyu
注意: 下拉多选框如果没有选中状态,ParameterValues是取不到值的~!