TOC PREV NEXT INDEX

domref



window.history


Returns a reference to the history object, which provides an interface for manipulating the browser history.

Syntax

historyObj = window.history
 

Parameters

historyObject is an object reference.

Example

h = window.history;
 
if ( h.length ) { // if there is a history
 
    h.back();     // equivalent to clicking back button
 
}
 

Notes

The history object provides the following interface:

current
 
back()
 
length
 
forward()
 
next
 
go()
 
previous
 

 

You can call access this interface from the window object by calling, for example, window.history.back().

Specification

DOM Level 0. Not part of specification.
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX