行,所以每当我想改变我的网址与哈希,我这样做: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) –