window.document : Window Object : Window JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Window » Window Object »

 

window.document










Syntax








window.document.event
    window.document.method()
    window.document.property




The document property is a child object of the Window object created when instances of the

tag are encountered.






















































































































































Event Handlers/Methods/Properties Description
onClick Called when the document is clicked.
onDblClick Called when the document is double-clicked.
onKeyDown Called when a key is pressed down. This occurs before an onKeyPress event handler.
onKeyPress Called when a key is pressed down immediately after an onKeyDown event handler.
onKeyUp Called when a key is released.
onMouseDown Called when the mouse button is pressed down.
onMouseUp Called when the mouse button is released.
captureEvents() Allows you to capture all events of the type passed in the document.
close() Closes the stream to the document.
getSelection() Returns the currently selected text.
handleEvent() Invokes the handler for the event specified.
open() Opens a stream to the document.
releaseEvents() Releases the events that you have captured of the type passed in the document.
routeEvent() Passes the specified event along the normal route of execution.
write() Writes the string passed to the document.
writeln() Writes the string, followed by a newline character, to the document.
alinkColor Specifies the ALINK attribute of the tag.
anchors Array containing each
applets Array containing each tag in a document.
bgColor Specifies the BGCOLOR attribute of the tag.
cookie Specifies a cookie.
domain Specifies the domain that served the document.
embeds Array containing each tag in a document.
fgColor Specifies the TEXT attribute of the tag.
formName The actual name of each
in a document.

forms Array containing each
tag in a document.

images Array containing each tag in a document.
lastModified Specifies the date the document was last changed.
layers Array containing each tag in a document.
linkColor Specifies the LINK attribute of the tag.
links Array containing each
plugins Array containing each plug-in in a document.
referrer Specifies the referral URL.
title Contains the text between the beginning and ending tags.
URL Specifies the URL of the document.
vlinkColor Specifies the VLINK attribute of the tag.















<html>
    <script language="JavaScript">
    <!--
    window.document.write("Hello, World!");
    -->
    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Window
» Window Object