有趣的API: history pushState/popstate 无刷新跳转
2017-05-27
阅读 1 分钟
18.9k摸鱼逛知乎看到这么一个问题 这个API看起来貌似很厉害的样子,搜搜看 不得不说,张鑫旭真的厉害。 API介绍 首先看看API如何使用: history.pushState(state, title, url) : 无刷新的向浏览器 历史最前方 加入一条记录。 state(any) 需要保存的数据,这个数据在触发popstate事件时保存在event.state上。 title(string): ...