document Properties Object Properties Summary
Sets or retrieves the domain name of the server where the document is located.
HTML |
N/A |
Script |
document.domain [ = sDomain ] |
sDomain |
String specifying the domain suffix. |
The property is read/write with no default value.
The property initially returns the host name of the server the page is served from, or null if the server cannot be identified by a domain name. The property can be assigned the security domain suffix to allow sharing of pages across frames.
For example, a page in one frame from home.microsoft.com and a page from www.microsoft.com would initially not be able to communicate with each other. However, by setting the domain property of both pages to the suffix, microsoft.com, both pages would be considered secure and access would be available between the pages.
document