子父窗口之间的操作之小例子

减小字体 增大字体 作者:佚名  来源:不详

test.htm  

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>子父窗口的操作</title>
</head>
<body>
<script>
var win=null;
function op(){
win=window.open("about:blank","win","width=200,height=200");
win.document.write("<input type='button' value='关闭父窗口' >");
win.document.write("<input type='button' value='刷新你窗口' >");
}
</script>
<input value="打开窗口" type="button"><input type="button" value="最小化" ><input type="button" value="最大化" ><input type=button value="关闭子窗口" ><input type=button value="刷新子窗口" ><input type="button" value="看子窗口的大小" >
</body>
</html>

运行效果如下: