Visit Mozilla.org

DOM:document.URL

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Returns the URL of the current document.

[edit] Syntax

string = document.URL 

[edit] Example

var currentURL = document.URL; alert(currentURL);

[edit] Notes

URL is a replacement for the DOM Level 0 document.location.href property. However document.URL is not settable, unlike document.location.href.

[edit] Specification

DOM Level 2 HTML: URL