<script>
function reloadOnce(){
if(window.name=="qswh")return;
window.name="qswh";
location.reload(true);
}
</script>
<input type=button onclick=reloadOnce() value=刷新>

解决方案 »

  1.   

    <script>
    function reloadOnce(){
    if(document.cookie!="")return;
    document.cookie="login=true"
    location.reload(true);
    }
    document.write(document.cookie)
    </script><input type=button onclick=reloadOnce() value=刷新>
      

  2.   

    btw:修正getCookie方法为以下<script>
    alert(getCookieByName("login"))
    alert(getCookieByName("login2"))
    function getCookieByName(name){
    var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
    if(arr=document.cookie.match(reg))
    return arr[2];
    else
    return null
    }
    </script>
      

  3.   

    btw:修正getCookie方法为以下<script>
    alert(getCookieByName("login"))
    alert(getCookieByName("login2"))
    function getCookieByName(name){
    var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
    if(arr=document.cookie.match(reg))
    return arr[2];
    else
    return null
    }
    </script>
      

  4.   

    to seabell(百合心) 
    现在的要求是
    点击一个按钮只刷新本页一次关键在于“只刷新本页一次”怎么办p.s.上回是
    点击一个按钮刷新本页
      

  5.   

    qiushuiwuhen(秋水无恨):哦,我明白了,所以你用cookie和窗口名方法,我正纳闷你的方法怎么这么怪呢
      

  6.   

    to xiaobeibei(小贝贝) 回复人: apple749769(尽量多学一点) (  ) 信誉:110  2002-5-17 8:35:39  得分:5  
     
     
      三角的数量    分数es(expert score)
    1       es>=0 && es<110
    2       es>=110 && es<500
    3       es>=500 && es<1000
    4       es>=1000 && es<1500
    5       es>=1500 && es<5000
    红星的数量     分数es(expert score)
    1       es>=5000 && es<10000
    2       es>=10000 && es<15000
    3       es>=15000 && es<20000
    4       es>20000 && es<25000
    5       es>25000 && es<30000
    ...
      
     
      

  7.   

    本贴是应网友收藏的要求重新发的,希望大家给出最可能多的解决办法。关于如何“摘星”和“给分多少”的说明见:http://www.csdn.net/expert/help.asphttp://www.csdn.net/help/help.asp?bigclass=论坛帮助&smallclass=论坛规则
      

  8.   

    孟子,不好意思,我都贴上来了,是不是没有起到调动大家再次思考的目的啊 :)
    p.s.未经整理主  题:  五一节小游戏:点击一个按钮,刷新当前页,你能有几种办法? 
    作  者:  net_lover (孟子E章)  
    等  级:    
    信 誉 值:  126 
    所属论坛:  Javascript 
    问题点数:  200 
    回复次数:  27 
    发表时间:  2002-04-26 09:12:18 
       
    五一节小游戏:点击一个按钮,刷新当前页,你能有几种办法?
    说明:不管用何种方法,在IE实现即可。点击一次只刷新一次,看看大家能说出几种。:)
     
     回复人: fhfpku(其实我是卧底) (  ) 信誉:97  2002-04-26 09:10:00    
     
      第一种 window.history.go(0)
     
     回复人: jxwangzhigang(一棵草) (  ) 信誉:97  2002-04-26 09:19:00    
     
      1:把按钮作成submit
    <form action="本身的asp文件" method=post>
      <input type=submit>
    </form>
    2:按钮button在javascript中写window.location.reload();
    还有没有别的正在想
     
     回复人: chensh1024(大俗) (  ) 信誉:100  2002-04-26 09:34:00    
     
      <input type=button value='click me' onclick='window.location.href="thisfile"'>
     
     回复人: weidegong(weidegong) (  ) 信誉:110  2002-04-26 09:42:00    
     
      <meta http-equiv="refresh" content="20; url=http://easecrea.yeah.net">
     
     回复人: Andrawu(Andrawu) (  ) 信誉:100  2002-04-26 10:18:00    
     
      思路:点击按钮,触发“F5”键,刷新页面。不知行不行?
     
     回复人: jxwangzhigang(一棵草) (  ) 信誉:97  2002-04-26 11:38:00    
     
      我就是不知道怎么控制ie中的按钮在网页中实现?
     
     回复人: qiushuiwuhen(秋水无恨) (  ) 信誉:105  2002-04-26 13:36:00    
     
    1.microsoft.xmlhttp
    2.#default#download
    3.wsh.sendKeys("{F5}")
    4.outerHTML=
    5.location.href=
    6.location.refresh
    7.location.replace()
    8.history.go(0)
    9.history.reload()
    10.window.navigate()
    11.document.execCommand("Refresh")
    ....
    暂且想这么多,够了么?
      
     回复人: qiushuiwuhen(秋水无恨) (  ) 信誉:105  2002-04-26 14:48:00    
     
      12.window.open("","_self","")13.加一个anchor,模拟click
    <a href=self.html id=t>t</a>
    <script>t.click()</script>
    14.加一个form,调用submit();......有点技穷了,呵呵
     
     回复人: net_lover(孟子E章) (  ) 信誉:126  2002-04-27 12:16:00    
     
      还有的呀!!!快想啊!
     
     回复人: qiushuiwuhen(秋水无恨) (  ) 信誉:105  2002-04-27 15:57:00    
     
      还有三种,不过比较偏,没必要说了先说自己知道总共几种,免得让我们瞎猜,呵呵
     
     回复人: saucer(思归) (  ) 信誉:105  2002-04-28 07:07:00    6.location.refresh  
    location没有refresh方法9.history.reload()
    history没有reload方法,location才有你还可以用
    document.open()
    document.URL
     
     回复人: dreammaster(天涯) (  ) 信誉:105  2002-04-28 09:38:00    
     
    window.history.go(0)
    window.document.location = url
    window.reload()
     
     回复人: yxrj() (  ) 信誉:105  2002-04-28 13:09:00    window.close();
    window.open(...);
     
     回复人: flylyke() (  ) 信誉:100  2002-04-28 17:09:00    
     
      <a href="#"></a>
    这个不知算不算
     
     回复人: runmin(稻草人) (  ) 信誉:98  2002-04-28 20:01:00    
     
      location = location.href凑热闹~这两个location的意义不同,嘿嘿~
     
     回复人: net_lover(孟子E章) (  ) 信誉:126  2002-04-29 16:50:00    
     
      大家回答的不错:WebBrowser,InternetExplorer
    <input type="button" onclick='window.execScript("window.location.reload()","Javascript")' value="Refresh This Window">
    <input type="button" onclick='window.execScript("window.parent.location.reload()","Javascript")' value="Refresh This Window">
    <input type="button" onclick='window.execScript("window.top.location.reload()","Javascript")' value="Refresh This Window">
    <input type="button" onclick='window.navigate(window.location)' value="Refresh This Window">
    <input type="button" onclick='window.open(window.location,"_self")' value="Refresh This Window">
    <input type="button" onclick='window.open(window.location,"_top")' value="Refresh This Window">
    .....
     
     回复人: net_lover(孟子E章) (  ) 信誉:126  2002-04-29 16:51:00    
     
      大家五一快乐~!
    结贴!!:)
      

  9.   

    使用变量
    <script>
    var cc = 0;
    function reloadOnce(){
    if(cc==0)
    {
      cc=1;
      location.reload(true);
    }
    }
    </script>
    <input type=button onclick=reloadOnce() value=刷新>
      

  10.   

    huamulan(洋洋):如果是只一次刷新,你的方法没用,因每次重载页面cc = 0;都会执行
      

  11.   

    <script>
    function reloadOnce(){
    if(location.search!="")return;
    location.replace(location+"?qswh");
    }
    </script>
    <input type=button onclick=reloadOnce() value=刷新>
      

  12.   

    哈哈...怎么忘记我上次的HTC 方法啊..HTC file:test.htc
    <PUBLIC:COMPONENT tagname="ReloadButton">
    <PUBLIC:ATTACH  onevent="re()" event="onclick"/>
    </PUBLIC:COMPONENT>
    <script>
    function re(){
    window.location.reload();
    }
    </script>HTML file:
    <style>
    .reload{behavior:url(test.htc)}
    </style>
    <body>
    <button class="reload">刷新</button>
    </body>
      

  13.   

    linhaibo(美洲豹):可能你的帖子是在我存下来以后发的吧 :)