如何控制用户关闭浏览器? [英] How can I control the user closes the browser?

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

问题描述

如何控制用户关闭浏览器?
询问用户?
您确定浏览器已关闭吗?
Asp.net

How can I control the user closes the browser?
The user is asked?
Are you sure the browser is closed?
Asp.net

推荐答案

请参阅本文,我认为它可以帮助您...
文章: 保存浏览器关闭或退出页面时的更改.
See this article I think it help you...
Article: Save Changes on Close of Browser or When Exiting the Page.


您可以处理javascript onbeforeunload事件 [
You could handle the javascript onbeforeunload event[^] but it is not likely to work for all browsers - no solution is. It will work in IE, but probably not in most of the others.

There is no single, simple solution which will do what you want.


这篇关于如何控制用户关闭浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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