行,所以每當我想改變我的網址與哈希,我這樣做:window.location.hash是否重新加載頁面?
window.location.hash = 'something';
但是我有一個問題。它只是我還是頁面再次加載?
行,所以每當我想改變我的網址與哈希,我這樣做:window.location.hash是否重新加載頁面?
window.location.hash = 'something';
但是我有一個問題。它只是我還是頁面再次加載?
它不應該重新加載,如果它重新加載,那麼你可能會使用IE。
,似乎是在IE中bug
,你可能想試試這個:
window.location.hash = 'id';
這適用於IE7。 (使用IE7標準在IE9上試用。)
呃,那就是他已經在使用的東西。 –
@ TomalakGeret'kal沒有看到它,對不起。 –
頁面不應該重新加載。你使用什麼瀏覽器/版本? – Will
[javascript location.hash在IE中刷新]的可能重複(http://stackoverflow.com/questions/2602260/javascript-location-hash-refreshing-in-ie) –