简体   繁体   English

我应该如何使用history.js

[英]How should I use history.js

I am a beginner to JS. 我是JS的初学者。 and I am learning how to use HTML history API to chnage the URL. 而且我正在学习如何使用HTML历史记录API来更改URL。 Act , I want to append query string parameters to the URL after Ajax call is made. 行动,我想在进行Ajax调用后将查询字符串参数附加到URL。 Which files do I need to include in my code, is it just history.js? 我需要在代码中包括哪些文件,仅是history.js? I dont know how to use this API(not asking about the coding part of that). 我不知道如何使用此API(不询问其编码部分)。

an dafter wiriting the pushstate method, do I need to give popstate also? 使用pushstate方法之后,我还需要设置popstate吗? Basically , if I have used Pushstate to append query String parameters to URL, DO I always nee dto give popstate()? 基本上,如果我使用Pushstate将查询字符串参数附加到URL,我是否总是要给popstate()? Thanks iin advance 谢谢我提前

尝试阅读本文,它解释了您需要的一切http://html5doctor.com/history-api/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM