Mega Code Archive

 
Categories / JavaScript Tutorial / Document
 

Document

The Document object represents a Web page that is displayed in a browser window, frame, or layer. An instance is created with each document that is loaded by the browser. Properties, Methods, and Event Handlers Associated with the Document Object are listed in the following table. alinkColorColor of activated link allArray of all HTML tags in the document anchorsArray of Anchor objects appletsArray of Applet objects bgcolorBackground color of document classesStyle sheet classes array cookieCookie associated with document domainDomain of document embedsArray of embedded objects fgcolorColor of text in document formsArray of Form objects idsStyle sheet IDs array imagesArray of Image objects lastModifiedDate when document was last modified layersArray of Layer objects linkColorColor of links linksArray of Link objects pluginsArray of embedded objects referrerURL of document to which the current document was linked tagsStyle sheet tag array titleTitle of document URLURL of current document vlinkColorColor of visited links captureEvents()Captures events to be handled by document close()Closes output stream to document getSelection()Returns the selected text open()Opens output stream to document releaseEvents()Releases events captured by document routeEvent()Routes captured events to other objects write()Appends text to document writeln()Appends text and a newline character to document onClickHandler for click events onDblClickHandler for double-click events onKeyDownHandler for KeyDown events onKeyPressHandler for KeyPress events onKeyUpHandler for KeyUp events onLoadHandler that is used when Document has finished loading onMouseDownHandler for MouseDown events onMouseUpHandler for MouseUp events onUnLoadHandler that is used when Document unloaded from window