[HTML][Javascrpt]如何利用Javascript刷新画面(多种方式)

如何利用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,html,function)