绕过IE"您所浏览的网页..."弹出 [英] Bypass IE "The webpage you are viewing..." pop up

查看:192
本文介绍了绕过IE"您所浏览的网页..."弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以绕过IE以下弹出框:

Is there a way to bypass the following IE popup box:

您正在查看的webapge是试图
  关闭窗口。你想要_____吗
  关闭此窗口?是|否

The webapge you are viewing is trying to close the window. Do you want to close this window? Yes|No

当我添加window.close()的一个asp.net按钮控件的onclick事件这正在发生。

This is occurring when I add window.close() to the onclick event of an asp.net button control.

推荐答案

您的JavaScript code只能关闭窗口而不确认这是$ P $由window.open pviously打开()。这是一个有意的安全precaution因为在网页上运行的不拥有窗口的脚本,并通过关闭它摒弃了浏览历史在那个窗口。

Your JavaScript code can only close a window without confirmation that was previously opened by window.open(). This is an intentional security precaution because a script running on a webpage does not own the window, and by closing it discards the browsing history in that window.

解决方法是要么有弹出要关闭与window.open首先,还是要告诉你的用户修改自己的浏览器安全设置窗口中的欢迎页面或其他某种页面让你的应用程序时关闭窗户。

The workaround is to either have a "welcome page" or otherwise some sort of page that pops up the window you want to close with window.open in the first place, or to tell your users to modify their browser security settings to allow your application to close their windows.

这篇关于绕过IE"您所浏览的网页..."弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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