asp selected
<%setrs1=server.CreateObject("ADODB.RecordSet")rs1.Source="select*from[bumeng]orderby...
<%
set rs1=server.CreateObject("ADODB.RecordSet")
rs1.Source="select * from [bumeng] order by paixi asc"
rs1.Open rs1.Source,conn,1,1
%>
<label for="bumeng"></label>
<select name="bumeng" size="1" id="bumeng">
<% while not rs1.eof %>
<option value="<%=rs1("id")%>" <% if rs1("id")=rs("bumeng") then response.write "selected" end if%>><%=rs1("bmming")%></option>
<%
rs1.movenext
wend
rs1.close
%>
</select></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="id" type="hidden" id="id" value="<%=id%>">
<input name="button" type="submit" class="button" onClick="return check()" id="button" value="提交"></td>
</tr>
</form>
</table>
<%
rs.close
set rs=nothing
end if%>
为什么<% if rs1("id")=rs("bumeng") then response.write "selected" end if%>没用,谁帮我看看,谢谢!~ 展开
set rs1=server.CreateObject("ADODB.RecordSet")
rs1.Source="select * from [bumeng] order by paixi asc"
rs1.Open rs1.Source,conn,1,1
%>
<label for="bumeng"></label>
<select name="bumeng" size="1" id="bumeng">
<% while not rs1.eof %>
<option value="<%=rs1("id")%>" <% if rs1("id")=rs("bumeng") then response.write "selected" end if%>><%=rs1("bmming")%></option>
<%
rs1.movenext
wend
rs1.close
%>
</select></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="id" type="hidden" id="id" value="<%=id%>">
<input name="button" type="submit" class="button" onClick="return check()" id="button" value="提交"></td>
</tr>
</form>
</table>
<%
rs.close
set rs=nothing
end if%>
为什么<% if rs1("id")=rs("bumeng") then response.write "selected" end if%>没用,谁帮我看看,谢谢!~ 展开
启帆信息
2024-11-19 广告
2024-11-19 广告
启帆信息是英伟达中国区代理商,原厂授权代理,提供全面的软件技术解决方案以及NVIDIA以太网产品、交换机等产品,欢迎前来咨询!...
点击进入详情页
本回答由启帆信息提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询