本文實例總結了Javascript刷新視窗方法。分享給大家參考,具體如下:
1.javascript 刷新父視窗
<script> function reflushParent(){ window.opener.location.reload(); } </script>
2.javascript 刷新本視窗
<script> function reflushMe(){ javascript:location.reload(); } </script>
3.javascript 刷新本視窗(新)
<script language='javascript'> var currentUrl = this.location.href var currentQuery = this.location.search window.location.href=currentUrl +currentQuery </script>
4.javascript 刷新本視窗並追加一個參數
<script language='javascript'> var currentUrl = this.location.href var currentQuery = this.location.search window.location.href=currentUrl +currentQuery +"&language=English" </script>
希望本文所述對大家JavaScript程式設計有所幫助。