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

HTML DOM domain Property

HTML DOM Document Object

domainThe property returns the domain name of the server that is loading the current document.

If the domain of the document cannot be identified, this property is used to returnnull.

Syntax:

document.domain
var x = document.domain;
Test and See‹/›

Browser Compatibility

All browsers fully support the 'domain' property:

Property
domainYesYesYesYesYes

Technical Details

Return Value:A string representing the domain part of the current document; if the domain cannot be identified, it will be null
DOM Version:DOM 2Level

HTML DOM Document Object