please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Document.location Property

Name

Document.location Property---the URL of the current document

Availability

Navigator 2.0, Internet Explorer 3.0; deprecated in Navigator 3.0--use Document.URL instead

Synopsis

document.location

Description

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.

See Also

"Document", "Document.URL", "Window.location"


Previous Home Next
Document.links[] Book Index Document.open()

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/java/script/definitive/refp_88.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/11/13 17:30,
TOP NEW HELP FIND: 
3.129.71.98: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?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/language/java/script/definitive/refp_88.htm"> [Chapter 21] Reference: Document.location</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .