代码编辑器:
x
1
<script>
2
function resizeWindow(){
3
top.resizeBy(100,100);
4
}
5
</script>
6
<form>
7
<input type="button" onclick="resizeWindow()" value="调整窗口">
8
</form>
9
<p><b>注意:</b>我们使用了 <b>top</b> 元素而不是<b>window</b>元素, 因为我们使用<b>frames</b>。如果你不使用<b>frames</b>,使用<b>window</b>元素来代替</p>
10