JavaScript Effects Instance 015-open Window special effects

Source: Internet
Author: User

Example 015 opening a window special effects instance descriptionWhen you click on the page to open the connection, a window pops up in the upper left corner of the screen and dynamically changes the width and height of the window, and when the height of the window is consistent with the screen height, continue adding the width of the window until it is the same size as the screen. Technical EssentialsThis example uses the open () method of the Window object to open an existing window, using the Availheight property of the screen object to get the height of the working area Use the MoveTo () and Resizeto () methods to specify the position and size of the window, and use the Resizeby () method to make the window grow larger until the window is the same size as the screen's work area. The MoveTo (), Resizeto (), and Resizeby () distributions for the Window object are described below respectively. (1) MoveTo method
<pre name= "code" class= "HTML" ><pre name= "code" class= "HTML" >window.moveto (x, y)
Parameter description.x: The x-coordinate of the upper-left corner of the window. y: The y-coordinate of the upper-left corner of the window. function: Moves the window to the specified coordinates. (2) Resizeto () method
Window.resizeto (x, y)
The parameters are described below.x: The horizontal width of the window. y: The vertical width of the window. function: Changes the current window to (x, y) size, and x, Y are width and height respectively. (3) Resizeby () method.
Window.resizeby (x, y)
The parameters are described below.x: The horizontal width to enlarge or shrink. y: Enlarges or shrinks the vertical width. function: Changes the current window to the specified size (x, y) when the value of x, Y is greater than 0 is expanded, and is smaller than 0. implementation Process(1) Pop-up window new.html
(2) main window to realize the function index.html
<! DOCTYPE html>


So this example is done.


JavaScript Effects Instance 015-open Window special effects

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.