用户注销时禁用后退按钮功能 [英] Disable back button functionality when user logged out
本文介绍了用户注销时禁用后退按钮功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的项目中,我想实现此功能:
当用户从网站注销并按返回按钮时,他不会导航到注销时所在的上一页.
我该怎么做?
In my project I want to implement this functionality:
When a user logs out from the website and then presses the back button he does not navigate to the previous page where he was when he logged out.
How do I do this?
推荐答案
尝试一下:
只需将此
Try this:
Just put this
javascript
放在标题部分
上方的aspx 页面的 html部分中
on the html section of aspx page above head section
<script type = "text/javascript" >
function disableBackButton()
{
window.history.forward();
}
setTimeout("disableBackButton()", 0);
</script>
请参阅更多详细信息:使用Javascript ASP.NET禁用浏览器后退按钮 [ ^ ]
Refer more details: Disable Browser Back Button Using Javascript ASP.NET[^]
已阅读本文,
Web开发-禁用后退按钮 [
Have a read of this article,
Web Development - Disabling the back button[^]
只需转到此链接:-
如何禁用浏览器的后退按钮 [ ^ ]
祝你好运.
Just go this link:-
How to disable browser''s back button[^]
Best of luck.
这篇关于用户注销时禁用后退按钮功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文