资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
子父窗口之间的操作
<P><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> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3E%0D%0Avar%20win%3Dnull%3B%0D%0Afunction%20op()%7B%0D%0Awin%3Dwindow.open(%22about%3Ablank%22%2C%22win%22%2C%22width%3D200%2Cheight%3D200%22)%3B%0D%0Awin.document.write(%22%3Cinput%20type%3D'button'%20value%3D'%E5%85%B3%E9%97%AD%E7%88%B6%E7%AA%97%E5%8F%A3'%20onclick%3D'window.opener.opener%3Dnull%3Bwindow.opener.close()'%3E%22)%3B%0D%0Awin.document.write(%22%3Cinput%20type%3D'button'%20value%3D'%E5%88%B7%E6%96%B0%E4%BD%A0%E7%AA%97%E5%8F%A3'%20onclick%3D'window.opener.location.reload()'%3E%22)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E"> <input onclick="op()" value="打开窗口" type="button"><input type="button" value="最小化" onclick="if(win&&win.open&&!win.closed){win.resizeTo(0,0);win.moveTo(0,window.screen.width);}else alert('还没有打开窗口或已经关闭')"><input type="button" value="最大化" onclick="if(win&&win.open&&!win.closed){win.moveTo(-4,-4);win.resizeTo(screen.availWidth+8,screen.availHeight+8);}else alert('还没有打开窗口或已经关闭');"><input type=button value="关闭子窗口" onclick="if(win&&win.open&&!win.closed){win.opener=null;win.close()}else alert('还没有打开窗口或已关闭')"><input type=button value="刷新子窗口" onclick="if(win&&win.open&&!win.closed){win.location.reload();win.focus()}else alert('窗口还没有打开或已关闭')"><input type="button" value="看子窗口的大小" onclick="if(win&&win.open&&!win.closed){alert(win.document.body.clientWidth+'*'+win.document.body.clientHeight);win.focus();}else{alert('还没有打开窗口或者已关闭')};"> </body> </html></P> <P> </P>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程