Section 25.203. Location.replace( ): replace one displayed document with another


25.203. Location.replace( ): replace one displayed document with another

JavaScript 1.1

25.203.1. Synopsis

 location.replace(url) 

25.203.1.1. Arguments

url

A string that specifies the URL of the new document that is to replace the current one.

25.203.2. Description

The replace( ) method of the Location object loads and displays a new document. Loading a document in this way is different from simply setting location or location.HRef in one important respect: the replace( ) method does not generate a new entry in the History object. When you use replace( ), the new URL overwrites the current entry in the History object. After calling replace( ), the browser's Back button does not return you to the previous URL; it returns you to the URL before that one.

25.203.3. See Also

History




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net