首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

做了一个刷新按钮 要求和F5一个效果 用js如何写呀

2012-02-11 
做了一个刷新按钮 要求和F5一个效果 用js怎么写呀inputtype button name renovates value 刷新

做了一个刷新按钮 要求和F5一个效果 用js怎么写呀
<input   type= "button "   name= "renovates "   value= "刷新 "   onclick= "renovates() "/>

<script>
function   renovates(){
        window.opener.document.location.reload();
}
</script>

怎么弄都不行

[解决办法]
window.document.location.reload();

or
window.top.document.location.reload();

[解决办法]
<input type= "button " name= "renovates " value= "刷新 " onclick= "renovates() "/>

<script>
function renovates(){
document.location.reload();
}
</script>
[解决办法]
reload(true);//从服务器上下载新的,默认为false,从缓存中取。
[解决办法]
window.self.location.reload();
[解决办法]
ls的几种方法都试过了 还是不行 T_T
==================================

8会吧?

t.htm
<input type= "text ">
<input type= "button " value= "open " onclick= "window.open( 'o.htm ', ' ', 'width=200,height=100 '); ">

o.htm
<input type= "button " name= "renovates " value= "刷新 " onclick= "renovates() "/>

<script>
function renovates(){
window.opener.document.location.reload();
}
</script>

在t.htm的文本框随便输入,再open,再open开的页点[刷新]看看!

热点排行