<P><ptml> <pead> <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> Child parent window Operations </title> </pead> <body> <script> var win= Null Function op () {Win=window.open ("About:blank", "Win", "width=200,height=200"); Win.document.write ("<input type=" Button ' value= ' Closes the parent window ' onclick= ' window.opener.opener=null;window.opener.close () ' > '); Win.document.write ("<input type= ' button ' value= ' refreshes your window ' onclick= ' window.opener.location.reload () ' >"); } </script> <input onclick= "op ()" Value= "open Window" type= button "><input type=" button "value=" Minimize "onclick=" if (win&&win.open&&!win.closed) {Win.resizeto (0,0); Win.moveto (0,window.screen.width);} else alert (' No windows open or Closed ') ' ><input type= button ' value= ' maximizes ' onclick= ' if (win&&win.open&&! win.closed) {Win.moveto ( -4,-4); WIN.REsizeto (screen.availwidth+8,screen.availheight+8);} else alert (' not yet open window or already closed '); " ><input Type=button value= "Closes the child window" onclick= "if (win&&win.open&&!win.closed) {win.opener=null; Win.close ()}else alert (' No windows open or Closed ') "><input Type=button value=" Refreshes the child window "onclick=" if (win&&win.open &&!win.closed) {win.location.reload (); Win.focus ()}else alert (' window is not yet turned on or closed ') "><input type=" button " Value= "Look at the size of the child window" onclick= "if (win&&win.open&&!win.closed) {alert (win.document.body.clientwidth+ ' * ') +win.document.body.clientheight); Win.focus ();} Else{alert (' Not yet open window or closed ')}; " > </body> </ptml></P> <P> </P>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]