如何實現重新整理網頁

admin發表於2017-02-11

重新整理網頁是常見操作,下面就羅列幾種比較常用的重新整理網頁的程式碼:

方法一:

[JavaScript] 純文字檢視 複製程式碼
history.go(0)

方法二:

[JavaScript] 純文字檢視 複製程式碼
location.reload()

方法三:

[JavaScript] 純文字檢視 複製程式碼
location.assign(URL)

方法四:

[JavaScript] 純文字檢視 複製程式碼
location.replace(url)

相關文章