admin管理员组

文章数量:1397065

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.

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.

Share Improve this question asked Oct 8, 2009 at 13:04 JineeshJineesh 11.4k5 gold badges25 silver badges25 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

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.",
"mywindow","location=1,status=1,scrollbars=1,
width=640,height=480"); 
window.open('something.html','new_win','width=320,height=240');

See also: http://google./search?q=popup+window+height+width+ie

本文标签: javascriptHow to get and set window popup height and width in Internet ExplorerStack Overflow