$(function () {
function pushHistory() {
var state = {
title: "title",
url: "#"
};
window.history.pushState(state, "title", "currentPage.html");
}
//将当前页面写入历史记录
pushHistory();
window.addEventListener("popstate", function(e) {
//alert("监听到了返回事件");
$(window).attr('location','lastPage.html');
}, false);
})