x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>蜜蜂教程(mifengjc.com)</title>
6
<script>
7
var w;
8
9
function openwindow() {
10
w = window.open('', '', 'width=100,height=100');
11
w.focus();
12
}
13
14
function myFunction() {
15
w.resizeTo(500, 500);
16
w.focus();
17
}
18
</script>
19
</head>
20
<body>
21
22
<button onclick="openwindow()">创建窗口</button>
23
<button onclick="myFunction()">调整窗口</button>
24
25
</body>
26
</html>