input.jsp
<body>
<form id="form1" name="form1" method="post" action="/0910/display4.jsp">
<p>你會哪些語言?
</p>
<p>
<label>
<input type="checkbox" name="lang" value="C" id="lang_0" />
C語言</label>
<br />
<label>
<input type="checkbox" name="lang" value="PHP" id="lang_1" />
PHP</label>
<br />
<label>
<input type="checkbox" name="lang" value="JAVA" id="lang_2" />
JAVA</label>
<br />
<input type="submit" name="button" id="button" value="送出" />
</p>
</form>
</body>
---------------------------------------------------------------------------------------------------
display.jsp
<body>
<%
String[] lang=request.getParameterValues("lang");
for(String data:lang){
out.println( data +"</br>");
}
%>
</body>
沒有留言:
張貼留言