其他浏览器的禁用回退按钮
$(function(){
if (window.history && window.history.pushState) {
$(window).on('popstate', function () {
window.history.pushState('forward', null, '');
window.history.forward(1);
});
}
window.history.pushState('forward', null, '');
window.history.forward(1);
})
关于ie8,ie8是没有这个功能的,只能通过url来实现
// 直接使用url去替换回退
var hash_current = "#";
var hash_last = "#";
window.location.hash = hash_current;
window.location.hash = hash_last;
window.onhashchange = function () {
window.location.hash = hash_current;
};