简体   繁体   English

在javascript中隐藏/禁用关闭图标

[英]hide/disable close icon in javascript

I want to hide or disable close icon of pop up window . 我想隐藏或禁用弹出窗口的关闭图标。 i have close button in form which will clse the the window using self.close().How i can do it in javac=script. 我有关闭按钮的形式,它将使用self.close()关闭窗口。我如何在javac = script中做到这一点。 i tried with toolbar=no in window.open, but it doesnt work. 我尝试在window.open中使用toolbar = no进行操作,但是它不起作用。 Is there any other method to do the same? 还有其他方法可以做到吗?

You can't do that via Javascript because the close button is a component from the user's operating system. 您无法通过Javascript执行此操作,因为关闭按钮是用户操作系统中的组件。 (Javascript can't tell the OS how to behave, it only can work with the browser.) (JavaScript无法告诉操作系统如何运行,只能与浏览器一起使用。)

You cannot disable the close button of a browser window, even if it's a popup. 您不能禁用浏览器窗口的关闭按钮,即使它是弹出窗口也是如此。 Imagine advertisements that couldn't close. 想象一下无法关闭的广告。 It just has too much potential to be abused. 它只是有太多的潜力被滥用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM