简体   繁体   English

如何禁用最大化,最小化和关闭按钮以打开新窗口

[英]How to disable maximize,mimimize and close button for a new window open

I am using window.open() method to open a page as a pop-up window for a link button click event. 我正在使用window.open()方法打开页面,作为链接按钮单击事件的弹出窗口。 But the poup-up window is having minimize,maximize,close(x) button. 但是弹出窗口具有最小化,最大化,关闭(x)按钮。

I dont want those buttons. 我不要那些按钮。 How can remove these buttons? 如何删除这些按钮?

This is the method i am using, 这是我使用的方法

window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,titlebar=no,scrollbars=1,resizable=0,width=450,height=310,left=500,top=350");

Tell me how can do this. 告诉我该怎么做。

Regards, Chirag Jain. 问候,Chirag Jain。

You can't. 你不能

If you want a popup style window without full window decorations you'd have to create a new overlay <div> on top of the existing content and fill that with content, perhaps using an <iframe> . 如果您想要一个没有完整窗口装饰的弹出窗口,则必须在现有内容之上创建一个新的叠加层<div> ,并使用<iframe>填充该内容。

You can't do it from javascript alone. 您不能仅凭JavaScript做到这一点。 Think about it, if you could, then people could put it into code on web-pages and cause other people's computers to open windows they couldn't easily close. 考虑一下,如果可以的话,人们可以将其放入网页代码中,并导致其他人的计算机打开他们无法轻易关闭的窗口。

Instead you'll have to look for an answer specific to whichever browser you're using to host this application, and change it on the computers of your users appropriately. 取而代之的是,您必须寻找一个用于托管该应用程序的浏览器的特定答案,然后在用户的计算机上进行相应更改。 Even then though I don't think you'll be in luck (with Firefox for example, I can see how to get rid of them on all browser windows, but not on just one). 即使那样,尽管我认为您不会走运(例如,使用Firefox,但我可以在所有浏览器窗口中看到如何摆脱它们,而不仅仅是在一个窗口中)。

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

相关问题 如何禁用Chrome的window.open弹出窗口中的最大化按钮? - How to disable the maximize button in window.open popup for chrome? 如何禁用弹出窗口的Firefox最大化按钮? - how to disable firefox maximize button for popup window? 我想在最大化模式下单击按钮在浏览器中打开新窗口 - I want to open the new window in browser on the click of button in maximize mode 如何使用按钮打开和关闭窗口 - How to open and close a window with a button 在Chrome / Mozilla中停用window.open的关闭按钮 - Disable the close button for window.open inChrome/Mozilla 每次单击 angular 按钮时,如何关闭已打开的窗口,然后打开一个新窗口? - How can i close an already opened window and then open a new window every time i click a button in angular? 如何使用 javascript 或 jquery 在页面加载时禁用浏览器最小化、最大化和关闭按钮 - How to disable browser minimize, maximize and close button on page load using javascript or jquery 如何禁用鼠标中键单击超链接以在新选项卡或新窗口中打开? - How to disable mouse middle button click on hyperlink to open in a new tab or new window? Javascript使用关闭按钮在同一窗口中打开新选项卡 - Javascript open new tab in same window with close button 如何禁用鼠标中键单击以在新选项卡或新窗口中打开 - How to disable mouse middle button click to open in a new tab or new window
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM