简体   繁体   English

没有菜单/网址/标题栏/滚动条/任何内容的javascript打开弹出窗口

[英]javascript open popup without menu/url/titlebar/scrollbar/anything

i have to open a popup window, i use this code: 我必须打开一个弹出窗口,我使用以下代码:

window.onbeforeunload = function(){

var windowincass = window.open('../Common/DomandaGenerica.jsp','domandagenerica','url=no,directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,scrolling=no,resizable=no,width=300,height=200,marginwidth=0,marginheight=0,frameborder=0');
}

the windwow opens but it has the menù, url and others. 风窗打开,但其中包含菜单,URL等。

How can i fix it? 我该如何解决?

for example i want something like this: 例如我想要这样的事情:

http://i.imgur.com/4fi8T.png http://i.imgur.com/4fi8T.png

but i got something like that: 但是我得到了这样的东西:

http://www.ajaxshake.com/public/usersFiles/main/ajax-example-windows-aero-style46_user_1_a3e5a.jpg http://www.ajaxshake.com/public/usersFiles/main/ajax-example-windows-aero-style46_user_1_a3e5a.jpg

i have to use IE 9. 我必须使用IE 9。

If you want a popup like in the first picture, you have to use a html element with basically following css properties, which shows up, when the Popup should be triggered. 如果要像第一张图片中那样弹出,则必须使用基本跟随css属性的html元素,该属性会在应该触发弹出窗口时显示。

CSS 的CSS

position: absolute;
z-index: 9999;

It is not possible to change the Styles of the operating system with Javascript in all common browsers. 在所有常见的浏览器中,都无法使用Javascript更改操作系统的样式。 And that is what you are trying to do, if you want to hide the title-bar, menu and so on... 这就是您要尝试执行的操作,如果您想隐藏标题栏,菜单等...

Also have a look at: 也看一下:

This corresponds to your purpose. 这符合您的目的。

You are looking to open a overlay popup. 您正在寻找打开一个叠加弹出窗口。 For that, I suggest you use some JavaScript library. 为此,我建议您使用一些JavaScript库。

jQueryUI dialog is one potential candidate. jQueryUI对话框是一个潜在的候选人。 But there are many more: 但是还有更多:

window.open() will open new browser instance, and now it's almost always frowned upon. window.open()将打开新的浏览器实例,现在几乎总是皱眉。 However, even with that you can control the appearance of the popup window to a certain extent by passing in WindowFeatures parameter as explained here (menubar, and status settings can be particularly helpful to you): 但是,即使如此,您也可以通过传递WindowFeatures参数来在一定程度上控制弹出窗口的外观(如此处所述(菜单栏和状态设置对您特别有帮助)):

https://developer.mozilla.org/en-US/docs/Web/API/Window.open#Position_and_size_features https://developer.mozilla.org/zh-CN/docs/Web/API/Window.open#Position_and_size_features

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

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