There are many document attributes that can be used to enhance your web pages. Some of those attributes are listed below.
- domain - web domain in which the current web page is stored
- URL - Universal Resource Locator indicates the page internet location
- referrer - page from which the current page was linked
- title - title of current web page
- lastModified - date and time at which the page was last modified
- forms - document element that refers to all forms on the current page
- forms.length - number of forms on the current page
- images - document element that refers to all images on the current page
- images.length - number of images on the current page
- links - document element that refers to all links on the current page
- links.length - number of links on the current page
- bgColor - background color of the web page
- fgColor - foreground or text color of the web page
- linkColor - color of links on the web page
- alinkColor - color of active links (mouse down) on the web page
- vlinkColor - color of visited links on the web page
Below is an example of a Javascript that uses these document attributes to display information about this web page. The results of this Javasript are shown at the bottom of the page.
|