获取数据库中的值:
(1),<select name="weekto" id="weekto">
<option value="mon" <%if("mon".equals(weekto)){%>selected<%}%>>星期一</option>
<option value="tue" <%if("tue".equals(weekto)){%>selected<%}%>>星期二</option>
<option value="wed" <%if("wed".equals(weekto)){%>selected<%}%>>星期三</option>
<option value="thu" <%if("thu".equals(weekto)){%>selected<%}%>>星期四</option>
<option value="fri" <%if("fri".equals(weekto)){%>selected<%}%>>星期五</option>
<option value="sat" <%if("sat".equals(weekto)){%>selected<%}%>>星期六</option>
<option value="sun" <%if("sun".equals(weekto)){%>selected<%}%>>星期日</option>
</select>
(2).if(a.equals("timecd")){
ResultSet rse1 = db.OpenSql("select * from timecondition");
while(rse1.next()){
if(sqrs.getString("unconroute").equals(rse1.getString("tcname")))
out.print("<option value="+rse1.getString("tcname")+" selected>"+rse1.getString("tcname")+"</option>");
else out.print("<option value="+rse1.getString("tcname")+">"+rse1.getString("tcname")+"</option>");
}
}