经典论坛's Archiver

zgx5218 发表于 2008-7-4 15:44

返回主页问题

<%dim nowh
nowh=hour(now())
if nowh>21 or nowh<8 then
response.Write("<script>alert('对不起,请您在8:00-21:00之间注册!');window.location.href='..index.asp'</script>")
end if%>
<%response.End()%>

这些语句在一文件夹的文件里放着,我想一点击提示框的确定后就返回根目录主页,window.location.href='..index.asp'可是返不回去,而且response.end也不起作用,还是继续执行下面语句,请大家看看是怎么回事?

hanguofeng 发表于 2008-7-4 15:52

../index.asp

zgx5218 发表于 2008-7-4 16:03

../index.asp  试了还是返不回去!!  况且,它还执行下面的语句啊!!

kuhanzhu 发表于 2008-7-4 16:11

if nowh>21 or nowh<8 then

早上8点前,晚上21点后直接JS
现在是执行不了的

你说的返回,也就句JS,写对了就OK了

zgx5218 发表于 2008-7-4 16:18

能帮忙给写一下那个JS吗?因为我的代码学的不好!!谢谢了!!

页: [1]



Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.