Window resizeTo() 方法
Window 对象
定义和用法
方法用于把窗口大小调整为指定的宽度和高度。
语法
window.resizeTo(width,height)
参数 |
说明 |
width |
必需的。设置窗口的宽度,以像素为单位 |
height |
必需的。设置窗口的高度,以像素为单位 |
浏览器支持





所有主要浏览器都支持 resizeTo() 方法
实例
实例
创建一个窗口, 设置宽度与高度为 500px:
var w=window.open('','', 'width=100,height=100');
w.resizeTo(500,500);
尝试一下 »
Window 对象