window object, such functions become methods of the
Note: If a browser window contains
<iframe>tags, there will be one
windowobject for the page containing the
<iframe>tags, and an additional
windowobject for the page in each
Below shows the use of a
.alert(), to display a message to the user:
window object is global, the “window.” portion can also be omitted:
window object has a number of properties and methods, some of which are listed below:
- Cancels a timer previously established by setInterval().
- Clears a previously scheduled timeout function.
- Instructs the browser window to show a optional message, the user then must confirm or cancel the message
- Displays a dialog with an optional message asking users to input some text.
- Executes a function repeatedly at specified intervals.
- Allows users to execute callbacks after a period of time expressed in milliseconds.