把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'取得跳转时间
%>

解决方案 »

  1.   

    能不能,f5.js从data.ini中获得数据啊。因为如果更改enter.htm就意味着我要更改网站的100多个页面。
      

  2.   

    来本就应当改f5.js把f5.js改成f5.asp:
    <%
    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>
      

  3.   

    我想得用ASP或PHP替换setTimeout(go,5000);里5000那个数
      

  4.   

    js本身不提供操作本地文件功能,include改成asp或者其他你服务器支持的服务器脚本语言吧。
      

  5.   

    用XML
    <xml id="time" src="time.xml"></xml>
      

  6.   

    将你的data.ini替换为xml:data.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);