当浏览器关闭如何使用asp.net杀死会话示例时 [英] when browser closed how to kill the session example using asp.net

查看:61
本文介绍了当浏览器关闭如何使用asp.net杀死会话示例时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当浏览器关闭如何使用asp.net杀死会话示例

when browser closed how to kill the session example using asp.net

推荐答案

没有保证可以做到这一点。您可以尝试在JavaScript或jQuery unload()事件中使用window.onclose事件, https://api.jquery.com/unload/ [ ^ ],但您不必担心关于它。当他们的会话到期时,会话将自动卸载。
There is no guaranteed way to do it. You can try using the window.onclose event in JavaScript or the jQuery unload() event, https://api.jquery.com/unload/[^], but you shouldn't need to worry about it. When their session expires the session will be unloaded automatically.


这篇关于当浏览器关闭如何使用asp.net杀死会话示例时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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