history.go(-n) 返回上一頁(n 為返回前幾頁) window.location.reload(); 刷新當前頁面 history.go(-1);window.locatoin.reload(); 等效於 self.location = document.referrer 返回上一頁並刷 ...
history.go(-n) 返回上一頁(n 為返回前幾頁)
window.location.reload(); 刷新當前頁面
history.go(-1);window.locatoin.reload(); 等效於 self.location = document.referrer 返回上一頁並刷新
wiodow.location.href = ''; 跳轉到其它頁面
刷新的幾種方法:
history.go(0)
location.reload()
location = location
location.assign(location)
document.execCommand('Refresh')
window.navigate(location)
location.replace(location)
document.URL = location.href
<meta http-equiv="refresh" content="10;url=http://www.baidu.com"> 10秒後跳轉到百度