当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM resizeTo() 方法

HTML DOM
DOM TableRow 对象
DOM Textarea 对象
DOM Window 对象

HTML DOM resizeTo() 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 342 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The resizeTo() method is used to resize the window to the specified width and height.
resizeTo()方法可用来将窗口的大小设置到指定的宽和高上

Note: This method does not work on dialog windows
注意:这个方法不能在窗口对话框中起到作用

Syntax 语法

resizeTo(width,height)

Parameter
参数
Description
描述
width Required. How many pixels to resize the width of the window to.
必选。将窗口改变到多少象素宽
height Optional. How many pixels to resize the height of the window to.
可选,将窗口改变到多少象素高


Example 举例

<html>
<head>
<script type="text/javascript">
function resizeWindow()
{
window.resizeTo(500,300)
}
</script>
</head>
<body>
<form>
<input type="button" onclick="resizeWindow()"
value="Resize window">
</form>
</body>
</html>


演练

Resize a window to a specified size
将窗口重新设置到指定的大小上

评论 (0) All

登陆 | 还没注册?