在浏览器关闭时注销帐户 [英] To Log out the Account when the Browser is closed

查看:123
本文介绍了在浏览器关闭时注销帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮我解决问题在浏览器关闭时注销帐户。

解决方案

请参阅相似答案的链接:

强制注销浏览器退出 [< a href =http://www.codeproject.com/Questions/98141/Force-log-off-on-browser-exittarget =_ blanktitle =New Window> ^ ]

通过点击检测浏览器关闭[X]按钮 [ ^ ]

在浏览器窗口关闭时销毁会话并注销用户,而不是单击注销按钮 [ ^ ]





- Amit


嗨试试这个



 <   script    类型  =  text / javascript >  
flag = true;
window.onbeforeunload = function(){if(flag)return警告你仍然登录,你确定吗?;} ;;
//调用您的注销函数
< / script >


Can Anyone Help me to solve the Problem " to Log out the Account when the Browser is closed".

解决方案

Refer the links for similar answers:
Force log off on browser exit[^]
Detect browser closing through clicks on the [X] button[^]
destroy session and logout a user when browser window is closed instead of clicking logout button[^]


--Amit


hi try this

<script type="text/javascript">
                flag=true;
                window.onbeforeunload = function(){if(flag)return "Warning you are still logged in, are you sure?";};
               //call your logout function
            </script>


这篇关于在浏览器关闭时注销帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆