Showing posts with label JavaScript Browser Objects Examples. Show all posts
Showing posts with label JavaScript Browser Objects Examples. Show all posts

Friday, August 31, 2012

JavaScript Browser Objects Examples


Examples of using JavaScript to access and manipulate the Browser objects.

Window Object

Display an alert box
Display an alert box with line-breaks
Display a confirm box, and alert what the visitor clicked
Display a prompt box
Create a pop-up window Open a new window when clicking on a button
Open a new window and control its appearance
Open multiple new windows
Assure that the new window does NOT get focus (send it to the background)
Assure that the new window GETS focus
Close the new window
Checks whether the new window has been closed or not
Return the name of the new window
Write some text to the source (parent) window
Move the new window relative to its current position
Move the new window to the specified position
Print the current page
Resize a window by the specified pixels
Resize a window to a specified size
Scroll the content by the specified number of pixels
Scroll the content to a specified position
A simple timing
Set and stop a timer with setTimeout() and clearTimeout()
Set and stop a timer with setInterval() and clearInterval()
More Window object examples in our JavaScript reference.

Navigator Object

More Navigator object examples in our JavaScript reference.

Screen Object

More Screen object examples in our JavaScript reference.

History Object

More History object examples in our JavaScript reference.

Location Object

More Location object examples in our JavaScript reference.