会这不难,谢谢了

梦想成真2003 2004-01-18 09:21:56
我想给下拉框增加值这样写的
<select name="seldw">
<%
rs.open "select * from sgd order by id desc",cn,3,1
do until rs.eof
response.write "<script>"
response.write "var a=new option"
response.write "a.text=" & rs.fields(1)
response.write "document.form1.seldw.options.add a"
response.write "</script>"
rs.movenext
loop
rs.close
%>
但是察看源代码为
<select name="seldw">
<script>var a=new optiona.text=5document.form1.seldw.options.add a</script>
</select>
我想问怎么换行,语法应该正确吗
...全文
32 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
TrueAndFalse 2004-01-19
  • 打赏
  • 举报
回复
严重同意!!
紫郢剑侠 2004-01-18
  • 打赏
  • 举报
回复
都说完了...

up
Clove 2004-01-18
  • 打赏
  • 举报
回复
都说完了
Idling
xieyj 2004-01-18
  • 打赏
  • 举报
回复
<select name="seldw">
<%
rs.open "select * from sgd order by id desc",cn,3,1
do until rs.eof%>
<option value="<%=rs.fields(l)%>"><%=rs.fields(l)%></option>
<%loop
rs.close
%>
chnj1981 2004-01-18
  • 打赏
  • 举报
回复
在javascript中的语句每句结束后使用";"
wesheng 2004-01-18
  • 打赏
  • 举报
回复
换行你可以用HTML的<br>,也可以用VBSCRIPT中的chr(13),也可以用JAVASCRIPT中的\n
aspnetxp 2004-01-18
  • 打赏
  • 举报
回复
支持zorou_fatal(Morphing......) 的.....................................................................................................................................................................................................................................................................................................................................................
say1no2 2004-01-18
  • 打赏
  • 举报
回复
这个试试
<select name="seldw">
<%
response.write "<script>"
response.write "var a=new option"
rs.open "select * from sgd order by id desc",cn,3,1
do until rs.eof
response.write "a.text=" & rs.fields(1)
response.write "document.form1.seldw.options.add a"
rs.movenext
loop
response.write "</script>"
rs.close
%>
flying310 2004-01-18
  • 打赏
  • 举报
回复
支持楼上。
zorou_fatal 2004-01-18
  • 打赏
  • 举报
回复
<%do until rs.eof%>
<option value="<%=rs.fields(l)%>"><%=rs.fields(l)%></option>
<%loop%>

28,407

社区成员

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

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