<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<Script>
function replaceFilters_requestString( str ){
str = str.replace(/=/g,':')
str = str.replace(/:/g,':"')
str = str.replace(/  /g,' ')
str = str.replace(/:"\/\//g,'://')
str = str.replace(/javascript:"/g,'javascript:')
str = str.replace(/&/g,'",')
str = str + '"'
str = str.replace(/""/g,'"')
str = str.replace(/:"&/g,':"",')
str = "{" + str + "}"
return str
}
function requestString( str ){
var getURL  = window.location.href
var getString = null
var strFilter = {}

if( getURL.indexOf("?") > 0 ){
getString = getURL.split("?")[1]
if( getString.indexOf("=") < 0){
return ""
}else{
eval( "strFilter=" + replaceFilters_requestString(getString))
}
}

oString = strFilter[str] if( oString == undefined || oString == null ){
oString = ""
}else{
oString = unescape(strFilter[str])
}
return oString
}if ( requestString("reload") == "" ){
url = window.location.href + "?reload=no"
setTimeout(function(){window.location.href=url},3000)
}
</Script>
<body></body>
</html>

解决方案 »

  1.   

    对,将是否刷新的状态写在cookies里
      

  2.   

    u2g2000的简化版。进入页面3秒后自动刷新。主要根据url来控制
    <html>
    <head>
    <Script>
    var getURL = window.location.href;
    var index  = getURL.indexOf("?reload=no");
    if ( index == -1 ){
    url = window.location.href + "?reload=no"
    setTimeout(function(){window.location.href=url},3000)
    }
    </Script>
    </head>
    </html>
      

  3.   

    可以考虑加个iframe,内容在iframe中显示
      

  4.   

    如果刷新页面有参数传递,用cookie好,如没有VBDN(王水云)比较简单!
      

  5.   

    谁有cookie的详细使用方法,帖出来啊!
      

  6.   

    如果是asp程序,我就用session!
      

  7.   

    u2g2000的简化版。进入页面3秒后自动刷新。主要根据url来控制
    <html>
    <head>
    <Script>
    var getURL = window.location.href;
    var index  = getURL.indexOf("?reload=no");
    if ( index == -1 ){
    url = window.location.href + "?reload=no"
    setTimeout(function(){window.location.href=url},3000)
    }
    </Script>
    </head>
    </html>正解
      

  8.   

    <html> 
    <head> 
    <Script> 
    var   getURL   =   window.location.href; 
    var   index     =   getURL.indexOf( "?reload=no "); 
    if   (   index   ==   -1   ){ 
    url   =   window.location.href   +   "?reload=no " 
    setTimeout(function(){window.location.href=url},3000) 

    </Script> 
    </head> 
    </html>
    终于找到了