Window Object

Advertisements

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

MethodDescription
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 Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements