JSP动态下拉框控件选项
<select name="sex">
<%
int selSex=ab.getSex();
if(selSex==0){
%>
<option selected value="0">男</option>
<option value="1">女</option>
<%
}
else{
%>
<option value="0">男</option>
<option selected value="1">女</option>
<%}%>
</select>
<%
int selSex=ab.getSex();
if(selSex==0){
%>
<option selected value="0">男</option>
<option value="1">女</option>
<%
}
else{
%>
<option value="0">男</option>
<option selected value="1">女</option>
<%}%>
</select>