//1.关于Radio Button //比如这里有个form.html,而且它要提交到result.jsp <form action="result.jsp" method="post"> <input type="radio" value="男" name="gender"/> <input type="radio" value="女" name="gender"/> </form> //然后在result.jsp页面中使用: <% String gender = request.getParameter("gender"); out.println("<h1>" + gender + "</h1>"); %> //2.关于Check Box //比如这里有个form.html,而且它要提交到result.jsp <form action="result.jsp" method="post"> <input type="checkbox" value="男" name="gender"/> <input type="checkbox" value="女" name="gender"/> </form> //然后result.jsp页面中使用: <% String[] genders = request.getParameterValues("gender"); for (int i=0; i<genders.length; i++){ out.println("<h1>" + genders[i] + "</h1>"); } %>