简体   繁体   中英

How to get and set window popup height and width in Internet Explorer

How to get and set window popup height and width in Internet Explorer using JavaScript

In Firefox I am able to set the height and width using outerHeight , outerWidth property of window.

Thanks.

If it's an existing window, you can set the size using window.resizeTo ( MSDN link ):

window.resizeTo(640, 480)

Or, you can specify the size when the window's being created using the window.open method ( MSDN link ):

window.open ("http://stackoverflow.com",
"mywindow","location=1,status=1,scrollbars=1,
width=640,height=480"); 
window.open('something.html','new_win','width=320,height=240');

另请参阅: http//google.com/search?q=popup+window+height+width+ie

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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