Actions between child parent Windows _javascript Tips

Source: Internet
Author: User
Tags microsoft frontpage
<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]
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.