错误前代码:
<tr class='trquery1' id="tr_reason" style="display:none"> <td width='211'>不占用配额的原因:</td> <td width='619' align="left"> <select name='sel_reason' id="sel_reason"> <option value='0'>请选择</option> <% dim sql_sel_reason sql_sel_reason="SELECT id, reason FROM t_no_quota_reason_config where deleted=0" set rs_sel_reason=db.execute(sql_sel_reason) while not rs_sel_reason.eof %> option value="<%=rs_sel_reason("id")%> ><%rs_sel_reason("reason")%></option> <% rs_sel_reason.movenext wend rs_sel_reason.close %> </select> </td> </tr>
修复后代码[红色区域是修改的地方]:
<tr class='trquery1' id="tr_reason" style="display:none"> <td width='211'>不占用配额的原因:</td> <td width='619' align="left"> <select name='sel_reason' id="sel_reason"> <option value='0'>请选择</option> <% dim sql_sel_reason sql_sel_reason="SELECT id, reason FROM t_no_quota_reason_config where deleted=0" set rs_sel_reason=db.execute(sql_sel_reason) while not rs_sel_reason.eof [color=red] response.Write "<option value="&rs_sel_reason("id")&" >"&rs_sel_reason("reason")&"</option>" [/color] rs_sel_reason.movenext wend rs_sel_reason.close %> </select> </td> </tr>
参考:http://www.codeproject.com/