没写过asp代码,试写一下 <%if (datediff("s","8:30",time())>0 and datediff("s","11:30",time())<0) or (datediff("s","13:30",time())>0 and datediff("s","17:30",time())<0) then response.Redirect("sorry.asp"); response.End(); end if %>然后在sorry.asp页面上写提示信息,想怎么写就怎么写 不需要任何js代码,也不需要关闭页面
如果是在后台判断你总会吧 ,那就用Ajax调用然后根据返回的值决定是否执行window.close();http://www.w3school.com.cn/tiy/t.asp?f=jquery_ajax2
<%if (datediff("s","8:30",time())>0 and datediff("s","11:30",time())<0) or (datediff("s","13:30",time())>0 and datediff("s","17:30",time())<0) then
response.Redirect("sorry.asp");
response.End();
end if
%>然后在sorry.asp页面上写提示信息,想怎么写就怎么写
不需要任何js代码,也不需要关闭页面