<script type="text/javascript">
$(document).ready(function(e) {
var counter = 0;
if (localStorage.lastname != "test") {
localStorage.lastname="test";
if (window.history && window.history.pushState) {
$(window).on('popstate', function () {
//window.history.pushState('forward', null, '2.html');
//window.history.forward();
$('#myModal').modal('show');
return;
//window.location.href="http://py028.w9py.com/2.html";
});
}
}
window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
window.history.forward(1);
});
</script>
浏览器后退事件
最新推荐文章于 2024-07-29 03:38:03 发布