javascript - 绕过 IE "The webpage you are viewing..."弹窗

标签 javascript asp.net internet-explorer popup

有没有办法绕过下面的IE弹框:

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 事件时发生的。

最佳答案

在打开的弹出窗口中写入以下内容

var objWin = window.self;
objWin.open('','_self','');
objWin.close();

关于javascript - 绕过 IE "The webpage you are viewing..."弹窗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/357410/

相关文章:

javascript - React Redux - 尝试使用 React-DnD 和 mapDispatchToProps 时遇到问题

.net - 在 Web 上显示 Excel 文档

c# - 在 ASP.NET 项目中将数据类型从 Oracle 转换为 SQL Server

c# - 以编程方式将文件从 'Temporary Internet Files' 复制到其他目录

css - IE 8 及以下版本在浏览器缩放时错误地调整 iframe 内容的大小

css - 为什么我的 wordpress 页面的 CSS 在 IE 中不能正常工作,但是当应用于非 wordpress 静态页面时在 IE 中工作正常?

javascript - django无法在 View 中创建常规对象,返回500错误

javascript - jQuery 使用 index()

javascript - 从 javascript 同步调用 Struts 2 操作

c# - 如何在运行时在 aspx 页面中加载用户控件?