浏览器关闭需要更新一个SQL表连接到zeo .. [英] Browser close need to update a SQL table is connected to zeo..

查看:78
本文介绍了浏览器关闭需要更新一个SQL表连接到zeo ..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

登录连接时将设置为1,登出连接将变为0但登录时间本身关闭浏览器连接仍为1。我有一个基于Isconnected的检查,用于使用特定用户名登录多个系统..



我尝试了什么:



当浏览器关闭时无法重置Isconnected

while login isconnected will be set to 1 and logout isconnected will become 0 but login time itself closing browser isconnected remains 1 . i have a checking based on Isconnected For mutiple system login using a particular username ..

What I have tried:

Can't reset Isconnected while browser close will happen

推荐答案

正确,你不能准确地做到这一点。您可以使用 WindowEventHandlers.onunload - Web API | MDN [ ^ ]并且可能得到你需要的东西。一般来说,何时或谁登录到网络应用程序无关紧要,因此您可以考虑重新考虑您要完成的工作。
Correct, you cannot do it accurately. You can use the WindowEventHandlers.onunload - Web APIs | MDN[^] and possibly get enough of what you need. Generally speaking it should not matter when or who is logged into a web app so you may consider rethinking what it is you are trying to accomplish.


使用此链接,



在里面调用c#方法onbeforeunload事件JS | ASP.NET论坛 [ ^ ]


这篇关于浏览器关闭需要更新一个SQL表连接到zeo ..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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