== JavaScript Document Object Methods and Properties ==
The JavaScript Document contains a wide range of methods and properties that are of considerable use to developers. The following table lists the key methods and properties provided by the Document object:
=== Document Object Methods ===
<td>fgColor<td>The foreground color (i.e. the color of the text in the document)</td>
<tr>
<td>cookie<td>The cookie, if aanyany, assosiated associated with the document. See [[Understanding JavaScript Cookies]]</td>
<tr>
<td>domain<td>The current domain of the document</td>
<td>referrer<td>The URL of the document from which the current document was linked (i.e. how the visitor arrived at this page)</td>
<tr>
<td>title<td>The title of the docuemnt document (corresponds to the HTML ''<title>'' tag)</td>
<tr>
<td>URL<td>The URL of the current document</td>
== Using the JavaScript Document Object ==
Now that we have seen the methods and properties that are avialable available with the Document object we can begin explore how to use them:
=== Writing text to a document ===
The document object ''open()'' and ''write()'' methods can be used to dynamically write text to a web page. The following example contains both some text contained in the HTML file, togetehr together with some JavaScript to write additional text into the page:
<pre>
=== Writing Text to a document in a different Window ===