实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script>
5
var w;
6
function openwindow()
7
{
8
w=window.open('','', 'width=100,height=100');
9
w.focus();
10
}
11
12
function myFunction()
13
{
14
w.resizeTo(500,500);
15
w.focus();
16
}
17
18
</script>
19
</head>
20
<body>
21
22
<button onclick="openwindow()">Create window</button>
23
<button onclick="myFunction()">Resize window</button>
24
25
</body>
26
</html>