Navigator 2.0, Internet Explorer 3.0; deprecated in Navigator 3.0--use Document.URL instead
document.location
In Navigator 2.0 and Internet Explorer 3.0, location is a read-only string property that contains the complete URL of the current document. The document.location property of a document is usually equal to the location.href of a window on these platforms. These two properties are not always equal, however, because the the location property of the Document object may be modified through URL redirection--Window.location contains the requested URL and Document.location specifies the actual URL of the retrieved document.
In Navigator 3.0, the location property of the Document object is a read-only reference to the same Location object referred to by the location property of the Window object. That is, in Navigator 3.0, window.location is always equal to document.location. Navigator 3.0 also introduces the URL property of the Document object. That new property behaves the same way as the location property did prior to Navigator 3.0--it is a string that contains the possibly redirected URL of the document.
While this is a fairly major change made in Navigator 3.0, it should not break many scripts. Because the Location object has a toString() method, the document.location property in Navigator 3.0 can be treated as if it were a string, just as it was in Navigator 2.0.
file: /Techref/language/JAVA/SCRIPT/definitive/refp_88.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/11/19 19:26,
3.129.70.162:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/Techref/language/JAVA/SCRIPT/definitive/refp_88.htm"> [Chapter 21] Reference: Document.location</A> |
Did you find what you needed? |