简体   繁体   English

如何使用jQuery / JavaScript设置弹出宽度最大宽度

[英]How to set pop up width width maximum using jquery/javascript

I am trying to open a popup window using javascript method: 我正在尝试使用javascript方法打开弹出窗口:

window.resizeTo(1300,500);

But this is not working. 但这是行不通的。 The browser that it is supposed to work in is IE. 它应该工作的浏览器是IE。 So I want to know if there is a way I can set width to full width of screen, irrespective of pixel size, like when we use "100%" width in css it cover the whole width. 因此,我想知道是否有一种方法可以将宽度设置为屏幕的整个宽度,而不管像素大小如何,例如当我们在CSS中使用“ 100%”宽度时,它将覆盖整个宽度。 Something like that. 这样的事情。

It worked when I tried width = screen.width in js. 当我在JS中尝试width = screen.width时,它起作用了。 See comments to question for more details. 请参阅要提问的评论以获取更多详细信息。 Credit to @scott_marcus 归功于@scott_marcus

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

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