Remove Hash when reloading page?

拥有回忆 提交于 2019-12-10 17:44:26

问题


Im using a hash to switch through my image slider. when i reload the page and the hash is set to e.h. #3 there is no picture. when the gallery slides automatically after some seconds it shows the next one... so for a few seconds there is nothing.

is there a way to check for a hash when loading the page and remove it? i just want to care about the persons who bookmark the page with the hash.

Greetings.

edited: hashtag --> hash (thank you.)


回答1:


location.hash = ""

Run that on page load.



来源:https://stackoverflow.com/questions/7894859/remove-hash-when-reloading-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!