开发者

load url without refreshing..how to do?

After some scouring I came across this html 5 code

window.history.pushState(“object or string”, “Title”, “/new-url”);

but how do you introduce it? how would I use such a code to change the url to http://google.com without refreshing the 开发者_Python百科page? how about a link or button that would do this?


Per the docs, you won't be able to change the URL to http://www.google.com/ unless the page attempting to make the change is on www.google.com. It'd be a tremendous security risk.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜