jsp下拉列表取值问题

来源:互联网 发布:linux服务器架设 编辑:程序博客网 时间:2024/06/10 14:01

<td>专业:
</td>
<%
 if (rs_zy != null) {
%>
   <td>
  <select name="stu_spe">
 <option value="0">
 -----请选择-----
 </option>
 <%
 while (rs_zy.next()) {
  %>
 <option value="<%=rs_zy.getInt(1)%>">
 <%=rs_zy.getString(3)%>
 </option>
 <%
  }
 %>
 </select>
 </td>

问 在servlet中咋取值?
int stu_pro= Integer.parseInt(Request.getParameter("stu_pro"));
这样为什么取不出来呀?

原创粉丝点击