WebBrowser/IE-如何使用"window.onbeforeunload = null"关闭(确定要离开此页面) [英] WebBrowser/IE - How do I use "window.onbeforeunload = null" to turn off (Are you sure you want to leave this page)

查看:161
本文介绍了WebBrowser/IE-如何使用"window.onbeforeunload = null"关闭(确定要离开此页面)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用"window.onbeforeunload = null"关闭(确定要离开此页面),因为我已经尝试遵循此链接,但仍然无法实现.

How do I use "window.onbeforeunload = null" to turn off (Are you sure you want to leave this page) cause I already tried to follow this link and that link but still unable to accomplish it.

推荐答案

您在这里不是在谈论VB.NET,而您真正在谈论的是JavaScript.我怀疑为了使该功能正常工作,您可能需要执行某种OnDocumentReady JavaScript函数并将其绑定到事件.

You are not talking VB.NET here,  and what you are really talking about is JavaScript. I suspect that in order to get the functionality to work, you may need to do some kind of a OnDocumentReady JavaScript function and tie it to an event.

您需要发布的论坛是ASP.NET论坛中的JavaScript论坛.

The forum you need to post to is the JavaScript forum in the ASP.NET forum.

http://forums.asp.net/

为什么不使用ASP.NET来执行此操作?为什么要使用Webbrowser控件?

Why are you not using ASP.NET to do this? Why are using the Webbrowser control?


这篇关于WebBrowser/IE-如何使用"window.onbeforeunload = null"关闭(确定要离开此页面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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