How can Jquery window.location.hash replace? [duplicate]

笑着哭i 提交于 2019-12-13 23:33:32

问题


How can i change http://www.example.com/#home to http://www.example.com/home

I'm using jquery tabs

Is it possible ?


回答1:


pushState will do this, though support isn't so great.

Read up here: http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate?16328a60




回答2:


You may try the replace function:

str = str.replace('#', '');


来源:https://stackoverflow.com/questions/12689408/how-can-jquery-window-location-hash-replace

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