JavaScript Window Object
JavaScript
The JavaScript window object represents the browser's window or frame where the content is displayed. It serves as the global object, providing methods and properties to control the browser window, such as opening new windows, resizing, navigating between pages, and handling events. Understanding the window object is essential for developing interactive web applications, as it allows you to manage browser behavior programmatically, ensuring a dynamic and user-friendly experience.
Method Description
Alert Opening an alert window with some message
BookMark Add to Favorite or Bookmark a link ( URL )
location Redirecting browser to different page
Confirm Confirm window to return TRUE of FALSE based on user action OK or CANCEL
Close window Close a window
Open child Open a child window with different prameters
Onload() Onload window event to trigger any function as soon as page opens
Prompt Getting user entered data by a Prompt window
setInterval() Calling a function repeatedly in a time interval
clearInterval() Resetting the setInterval object
moveBy() Moving window from its current location
moveTo() Moving window To a fixed location
resizeTo() Resizeing window by changing height and width
blur() When we lost focus from a window
focus() Bringing focus to a window
closed() Knowing the window status : closed or not
favorite Adding page to favorite ro bookmark
Status Msg Displaying status bar message
Applications using various window and other objects in JavaScript
Application Description
Stopwatch Incremental stopwatch by button control
Refreshing Reloading parent window while updating child window
child parent Passing user entered data from child window to parent window
pop up Displaying Popup window in JavaScript
conformation Asking user confirmation before deleting a record ( Are you sure ?)
Screen Object Description
Screen Width, height, colorDepth, pixelDepth of the user screen
← JavaScript
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
plus2net.com