把enter.htm改成enter.asp:
data.ini:
24
<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(server.MapPath("data.ini"),1,0)
dim LimitTime
LimitTime = ts.readline'取得跳转时间
%>
data.ini:
24
<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(server.MapPath("data.ini"),1,0)
dim LimitTime
LimitTime = ts.readline'取得跳转时间
%>
<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(server.MapPath("data.ini"),1,0)
dim LimitTime
LimitTime = ts.readline'取得跳转时间
%>
function go()
{
location.href="index.swf";
}function notgo()
{
clearTimeout(mygo);
mygo=setTimeout(go,<%=LimitTime%>); //////////<====
}
document.onmouseover=notgo;
document.onmousemove=notgo;
document.onmouseout=notgo;
document.onmousedown=notgo;
document.onmouseup=notgo;
document.onkeydown=notgo;
mygo=setTimeout(go,5000);
跳转页面:enter.htm
<html>
<Head>
<META content="text/html;charset=gb2312" http-equiv="Content-Type">
<TITLE>欢迎</TITLE>
<script src="f5.asp"></script>
</HEAD>
<body>
</body>
</html>
<xml id="time" src="time.xml"></xml>
如
<time>
500
</time>
你的js:
xmldoc=new ActiveXObject("Microsoft.xmldom");
xmldoc.async=false;
//注释的是导入状态检查
//xmldoc.onreadystatechange=trackReadyState;
xmldoc.load("data.xml");
root=xmldoc.documentElement;
//获取时间
time=parseInt(root.text);