实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script>
5
function resizeWindow()
6
{
7
top.resizeBy(100,100);
8
}
9
</script>
10
</head>
11
12
<body>
13
<form>
14
<input type="button" onclick="resizeWindow()" value="Resize window">
15
</form>
16
<p><b>Note:</b> We have used the <b>top</b> element instead of the <b>window</b> element, because we use frames. If you do not use frames, use the <b>window</b> element instead.</p>
17
</body>
18
19
</html>