下接列表框的问题

xushinhwa2003 2003-09-11 02:18:57
当我用<form action="本身文件"><select.....</select></form> 做的下接列表框

我想每次回来加载时,下拉列表框不要刷新,还是上回选取中的内容。当我按提交按钮时不要被刷新,还是上回选取中的内容。
...全文
96 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
007james 2003-09-11
  • 打赏
  • 举报
回复
<form name="frm">
<select name="test" >
<option value="a"> a
......
<option value="b"> b
</select>

</form>
<script language="javascript">
document.frm.test.value = "<%=request("test")%>";
</script>

rongwenfeng 2003-09-11
  • 打赏
  • 举报
回复
楼上的两位用的是同一种方法,不过是最简单的
楚人无衣 2003-09-11
  • 打赏
  • 举报
回复
<%if request("sel")<>"" then response.cookies("sel")=request("sel")%>
...
<select...>
<%if request.cookies("sel")<>"" then%>
<option selected><%=request.cookies("sel")%></option>
<%end if%>
...
</select>
junsunchen 2003-09-11
  • 打赏
  • 举报
回复
<select name="username" >
<option <%if request("username")="Kelly" response.write "selected" %> value="Kelly"> Kelly
<option <%if request("username")="Junsun" response.write "selected" %> value="Junsun"> Junsun
</select>
anita2li 2003-09-11
  • 打赏
  • 举报
回复
<select name="test" >
<option <%if request("test")="a" response.write "selected" %> value="a"> a
<option <%if request("test")="b" response.write "selected" %> value="b"> b
</select>

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧