HTML and CSS Reference
A new window object is created. If the resizable option is turned off, the user will
not be able to maximize the window. A maximized window cannot be moved with
the moveTo() method.
The moveTo() method determines the position where the window will be moved.
The arguments 0,0 represent the x,y coordinates (column,row) in pixels.
The new window will be put into focus, meaning it will be at the top of the win-
dow hierarchy, in front of all the other windows.
The parent window is the original window we started in. It is moved to coordi-
nates 215 × 0 pixels.
The parent (original) window is resized to 400 × 400 pixels.
This is the start of a simple HTML form. It creates a simple input device called a
button on the screen.
This is the onClick event handler. When the user presses the button, the event is
triggered and a function called directions() , will be called. The new window is
moved to the top left corner and put into focus. See Figure 10.18.
Figure 10.18 After moving, focusing, and resizing both the new window and the
parent window: Output from Example 10.9.
Timer Methods. The window object provides two methods that act like an alarm
clock so that you can time when you want certain things to happen in your program: