This is deprecated now in favor of using the Document.URL property to access a Url object.
In version 1.0 of JavaScript this was a simple string primitive value that contained the actual location of a window. It was not necessarily the same value as the Window.location.href value which always contained the requested location.
As of version 1.1 of JavaScript, this is now a reference to the same object that Window.location points at. However at the same time its use became deprecated.
This location property is not the same as the location property that belongs to a window. The document.location property is a string containing the URL that the document was loaded from. The window.location property is a reference to the requested URL encapsulated in an object. Because of this, the document.location property is not preferred and you should use the document.URL property to avoid confusion.
This property is supposed to be read only. However, Netscape 4 allows this property value to be changed. This is not recommended practice and you should use the Window.location.href property to change the page in the window.
Prev | Home | Next |
Document.links[] | Up | Document.open() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |