开发者

location hash without the #

How to make this thing, i want when giving a location.has开发者_如何转开发h, to output in the addres bar like this, for example..

I have

location.hash = "asd"; 

And it will output #asd

But how to make to output only asd


If you want to modify the URL using JavaScript without actually loading a new page, you need to use the HTML5 history API and its pushState method.

  • http://diveintohtml5.ep.io/history.html
  • http://html5demos.com/history
  • https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history#section_4


I think you want:

location.href
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜