如何在asp.net中处理Internet Explorer按钮。 [英] How can I handle internet explorer buttons in asp.net.

查看:54
本文介绍了如何在asp.net中处理Internet Explorer按钮。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何处理asp.net中的Internet Explorer按钮,例如返回,转发

我希望当任何人单击关闭按钮然后显示消息(ok,cancel)

解决方案

使用 onbeforeunload 事件 - 单击关闭按钮时,在卸载事件之前调用它。



关于类似行的文章:在关闭浏览器或退出页面时保存更改 [ ^ ]


请扔掉这个。

谢谢



https://developer.mozilla.org/en-US/docs/DOM/window.onclose [ ^ ] [

How can I handle internet explorer buttons in asp.net e.g back, forward
and I want to that when any one click the close button then it display message (ok, cancel)

解决方案

Use onbeforeunload event - It is called before the unload event when you click the close button.

An article on similar lines: Save Changes on Close of Browser or When Exiting the Page[^]


Please go throw this.
Thanks

https://developer.mozilla.org/en-US/docs/DOM/window.onclose[^][]


这篇关于如何在asp.net中处理Internet Explorer按钮。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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