让select option不要打开新网页?

bbzy 2010-04-02 08:54:33
我的一段程序,是在页面select 中选择后,ykSmall2Class打开一个新网页,这样就有2个网页了,再选择,就有3个了
现在是要求:只有一个新网页,即要关闭旧网页,请问怎么设置参数?
谢谢
javastr=javastr+"<select style=""BACKGROUND:"&KsBtBjColor&";color:"&KsBtColor&";width:160pt;font-size:12pt"" onchange=javascript:window.open(this.options[this.selectedIndex].value) name=""dh2"" >"
javastr=javastr+"<option>---学 习 资 料 ---</option>"
if not rs.eof then
do while not rs.eof
vchlink="ykSmall2Class.asp?BName="&rs(0)&"&SName="&rs(1)&"&Sort=学习资料"
javastr=javastr+"<option value="&vchLink&">"&rs("SmallClassName")&" </option>"
rs.MoveNext
loop
end If
rs.close
javastr=javastr+"</select>"


...全文
134 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
shan1119 2010-04-02
  • 打赏
  • 举报
回复
onchange="javascript:top.location=this.options[this.selectedIndex].value"
yan11cn 2010-04-02
  • 打赏
  • 举报
回复
直接把当前页面跳转就行。。。
javastr=javastr+"<select style=""BACKGROUND:"&KsBtBjColor&";color:"&KsBtColor&";width:160pt;font-size:12pt"" onchange=javascript:window.location.href=this.options[this.selectedIndex].value name=""dh2"" >"
yan11cn 2010-04-02
  • 打赏
  • 举报
回复
javastr=javastr+"<select style=""BACKGROUND:"&KsBtBjColor&";color:"&KsBtColor&";width:160pt;font-size:12pt"" onchange=javascript:window.open(this.options[this.selectedIndex].value);window.close(); name=""dh2"" >"

28,391

社区成员

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

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