日期:2014-05-16  浏览次数:20425 次

做了一个刷新按钮 要求和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开的页点[刷新]看看!