Only one center window is displayed in Js.

Source: Internet
Author: User

VaR newwindow; // defines a window, facilitating inter-window communication <br/> function makenewwindow (URL) {<br/> If (! Newwindow | newwindow. closed) {<br/> var width = 400; <br/> var Height = 300; <br/> var left = parseint (screen. availwidth/2)-(width/2); // center the screen <br/> var Top = parseint (screen. availheight/2)-(height/2); <br/> var windowfeatures = "width =" + width + ", Height =" + height + ", status, resizable, left = "+ Left +", Top = "+ TOP +" screenx = "+ Left +", screeny = "+ top; <br/> newwindow = Window. open (UR L, "subwind", windowfeatures); <br/>}else {<br/> // window is already open, so bring it to the front <br/> newwindow. focus (); <br/>}</P> <p> <script language = "JavaScript"> <br/> <! -- <Br/> window. open ('page.html ', 'newwindow', 'height = 100, width = 400, Top = 0, Left = 0, toolbar = No, menubar = No, scrollbars = No, resizable = No, location = No, status = no ') <br/> // write a line <br/> --> <br/> </SCRIPT> </P> <p> <script language = "JavaScript"> Javascript script starts.; <br/> window. open the command to pop up a new window; <br/> name of the page.html pop-up window; <br/> name of the newwindow pop-up window (not a file name), optional, can be replaced by null; <br/> Height = 100 window height; <br/> width = 400 window width; <br/> Top = 0 window away from the screen <Br/> left = 0. The pixel value on the left of the window is displayed. <br/> toolbar = No indicates whether to display the toolbar. Yes indicates whether to display; <br/> menubar and scrollbars indicate the menu bar and scroll bar. <Br/> resizable = No: whether to change the window size; yes: Yes; <br/> location = No: whether to display the address bar; yes: Yes; <br/> Status = No: whether to display information in the status bar (usually the file has been opened). Yes indicates yes; <br/> </SCRIPT> end of JS script </P> <p>

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.