码迷,mamicode.com
首页 > 其他好文 > 详细

到某个指定的页面不可以后退

时间:2017-07-07 15:29:40      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:forward   onload   完成   on()   ext   script   alert   null   后退   

<script type="text/javascript">
window.onload=function(){
if (window.history && window.history.pushState) {
window.onpopstate=function(){
window.history.pushState(‘forward‘, null, ‘#‘);
window.history.forward(1);
alert("请先完成注册,再进行其他操作!")
}
window.history.pushState(‘forward‘, null, ‘#‘);
window.history.forward(1); 
}
} 
</script>

到某个指定的页面不可以后退

标签:forward   onload   完成   on()   ext   script   alert   null   后退   

原文地址:http://www.cnblogs.com/mengcode/p/7132110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!