JavaScript host Object Window.screen, Window.close ()/open (), Window.moveto, Window.resizeto

Source: Internet
Author: User

The Window.screen property provides information other than the browser. Here is a brief overview:

    • Screen.availwidth-Available screen widths (excluding operating system menu)
    • Screen.availheight-Available screen height (remove operating system menu)
    • Screen.width-Total resolution width
    • Screen.height-Total resolution height

The window.open property is a way for us to open a new window, mainly receiving parameters:

1. URL to load the window

2. The name of the new window for the Taeget property of the new window form tag;

3. A comma-separated list of functional---resizable: whether the window is resizable, width, height of a window, status is used to set the visibility of the window.

var win = window.open (' http://www.baidu.com ', ' Hello ', ' width=300;height=300;resizable=yes ');

The window.close method is used to close the window.

Window.moveto

// moves the current window to the position of the screen coordinate x=100,y=100, relative to the upper-left corner of the screen.  // Move the current window to the right by 10 pixels and move up 10 pixels. 

Window.resizeto is used to control the size of the window;

The above methods are generally still less used as a good idea.

JavaScript host Object Window.screen, Window.close ()/open (), Window.moveto, Window.resizeto

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.