[英]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.