window.location.href是刷新當前頁面,也就是更新瀏覽器地址欄。
window.open是新打開一個標籤頁。
<a href="/"/>是一個連接地址,href="/"是指連接到的地址,沒寫target屬性則認爲是在當前頁打開這個連接,效果和window.location.href一樣。
window.location.href是刷新當前頁面,也就是更新瀏覽器地址欄。
window.open是新打開一個標籤頁。
<a href="/"/>是一個連接地址,href="/"是指連接到的地址,沒寫target屬性則認爲是在當前頁打開這個連接,效果和window.location.href一樣。