Methods and Properties of the Document Object : Document « Development « JavaScript DHTML






Methods and Properties of the Document Object

  Methods     
captureEvents()   Captures events to be handled by the document. 
close()           Closes output stream to the document.
contextual()      Allows you to selectively apply a style to an HTML element that appears in a specific context. 
getSelection()    Returns the selected text.
handleEvent()     Invokes the handler for the specified event. 
open()            Opens output stream to document.
releaseEvents()   Releases events captured by the document. 
routeEvent()      Routes captured events to other objects. 
write()           Appends text to the document.
writeln()         Appends text and a newline character to the document.

 Property
alinkColor        Color of an activated link.
all               Array of all HTML tags in the document. 
anchors           Array of Anchor objects.
applets           Array of Applet objects.
bgcolor           Background color of the document.
classes           Style sheet classes array.
cookie            Cookie associated with the document.
domain            Domain of the document.
embeds            Array of embedded objects.
fgcolor           Color of text in the document.
forms             Array of Form objects.
formName          Specifies Form instance accessed by using the value of the name attribute in the form tag.
height            Specifies height in pixels of the document. 
ids               Style sheet IDs array.
images            Array of Image objects.
lastModified      Date when the document was last modified.
layers            Array of Layer objects.
linkColor         Color of links.
links             Array of Link objects.
plugins           Array of embedded objects.
referrer          URL of the document to which the current document was linked.
tags              Style sheet tag array.
title             Title of the document.
URL               URL of the current document.
vlinkColor        Color of visited links.
width             Specifies width in pixels of the document.
           
       








Related examples in the same category

1.Output HTML in JavaScript
2.Output
with Javascript
3.Display info in a new page
4.Recursively reverse all nodes beneath Node n, and reverse Text nodes
5.Reverse the order of the children of Node (document)
6.Open a new document and add some text
7.Get element by name: getElementsByName()
8.Get a specified element using getElementById()
9.Title of a document
10.Referrer of a document (URL of the document)
11.Hide Email Address
12.Convert space to URL encode
13.document last Modified Property in Another Format
14.Checking document referrer
15.Make button (control) visible or invisible
16.Opening a New URL
17. HTML Page with Immediate Script Statements
18.Using document.write() on the Current Window
19.Using document.write() on Another Window