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

HTML DOM
DOM 介绍
HTML DOM 举例
DOM 参考
DOM 摘要
HTML DOM 实例
DOM Anchor
DOM Applet
DOM Area
DOM Base 对象
DOM Basefont对象
DOM Body 对象
DOM Document 对象
DOM 事件
DOM Form 对象
DOM Frame 对象
DOM Frameset 对象
DOM History
DOM Iframe 对象
DOM Image 对象
HTML DOM Button对象

HTML DOM resizeTo() 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 340 ::
收藏到网摘: 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

登陆 | 还没注册?