TOC PREV NEXT INDEX

domref



location


Gets the URL of the current document.

Syntax

loc = document.location
 

Parameters

loc is the URL as a string.

Example

dump(document.location);
 
// returns a string like
 
// http://www.peoplemagazine.com/juicybits.html
 

Notes

document.location works the same as document.URL. Both are read-only properties unlike window.location, which can be set. Since the document object represents a single document or URL, its location cannot be changed.

Specification

DOM Level 0. Not part of specification.


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