English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM URL Property

HTML DOM Document Object

URLThe read-only property returns the complete URL of the current document as a string.

Syntax:

document.URL
var url = document.URL;
Test See‹/›

Browser Compatibility

All browsers fully support the URL property:

Property
URLYesYesYesYesYes

Technical Details

Return Value:A string representing the complete URL of the document, including the protocol (such as http or https)
DOM Version:DOM Level1

HTML DOM Document Object