当我提交表格时,我有一个申请表格,它正在重定向到窗口,该窗口有“打印”和关闭选项。
Please click <a onclick="self.close();" href="#">here</a> to close this window.
如果我点击关闭,标签本身会关闭Chrome和IE,但它无法在Mozilla中运行。
当我使用此代码时,
Please click <a onclick="CloseWindow();" href="#">here</a> to close this window.
<script type="text/javascript">
function CloseWindow() {
open(location, '_parent').close()
}
</script>
重定向到应用在线页面。
我将如何关闭标签本身。
self.close();
适用于IE和Chrome,但在Mozilla中显示错误:
脚本可能无法关闭脚本未打开的窗口。
或者我们可以制作'dom.allow_scripts_to_close_windows,true;'使用c#还是javascript?