摘要:
在使用 AJAX 方式更新页面内容后,页面的 URL 并没有改变,因此用浏览器的前进和后退无法切换这些不同的页面状态。这个问题利用 HTML5 的 history API 可以完美地解决。HTML5 history API最简单的例子如下:if (history.pushState) { var state = {page: 2 }; history.pushState(state, "title", location.href + '#2'); window.onpopstate = function(event) { console.log(event. 阅读全文
posted @ 2013-06-11 20:44
zoho
阅读(374)
评论(0)
推荐(0)

浙公网安备 33010602011771号