输入banner图图片脚本导航/分类

判断Session的过期时间 采用JavaScript实时显示剩余多少秒

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%session.timeout=1440 '单位(分钟)1440=24小时 参数不能大于24小时 也就是不能大于1440分钟%>
<%
if session("login")<>"888888" then'判断Session是否有效
Response.Write("Session过期了")
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.gxlsystem.com
</body>
</html>
能不能在时间到的时候弹出一个警告,点击之后进入另一画面?
<script>
var lefttime=3 //session时间传递
var tid
function x()
{
lefttime--
document.all.xx.innerText="剩余:"+lefttime + "秒"
if(lefttime==0)
{
window.clearInterval(tid);
if(window.confirm("您要进入吗?"))
window.open("//www.gxlsystem.com/")
}
}
tid = window.setInterval("x()",1000)
</script>
<body>
<div id=xx></div>
不要window.open打开另一个页面,要在原来的那个页面上打开新的页面。
将window.open("//www.gxlsystem.com/")改成
window.locaton.href="//www.gxlsystem.com"就行了