如何破解asp.net中的浏览器关闭事件 [英] How to crack the browser close event in asp.net
本文介绍了如何破解asp.net中的浏览器关闭事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想在后面的代码中触发浏览器close(X)事件.如何在asp.net中破解此事件
在此先感谢
Regds
Hello all,
I want to fire browser close(X) event in code behind. how to crack this event in asp.net
Thanks in advance
Regds
推荐答案
好吧,您不能这样破解".
如果有帮助,您可以最大程度地做到这一点:
Well, you cannot ''crack'' as such.
Maximum you can do this, if it helps:
Page.ClientScript.RegisterStartupScript(this.GetType(),"close","window.close();",true);
这将注入Javascript代码以关闭您网站所在的当前浏览器窗口.
This will inject Javascript code to close the current browser window where your website is.
这篇关于如何破解asp.net中的浏览器关闭事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文