Window Object

Prev Tutorial Next Tutorial

Window Object

The window object represents a window in browser. An object of window is created automatically by the browser.
Window is the object of browser, it is not the object of javascript. The javascript objects are string, array, date etc. It is used to display the popup dialog box such as alert dialog box, confirm dialog box, input dialog box etc.

window object

The window methods are mainly for opening and closing new windows. The following are the main window methods. They are:

Methods of window object

alert()displays the alert box containing message with ok button.
confirm()Displays the confirm dialog box containing message with ok and cancel button.
prompt()Displays a dialog box to get input from the user.
open()Opens the new window.
close()Closes the current window.
setTimeout()Performs action after specified time like calling function, evaluating expressions etc.

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain,, @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: WhatsApp no. 8882538826

Yahoo Advertisements