An HTML document consists of HEAD and BODY tags. The HEAD tag includes information on the document's title and base (the absolute URL base to be used for relative URL links in the document). The BODY tag encloses the body of a document, which is defined by the current URL. The entire body of the document (all other HTML elements for the document) goes within the BODY tag.
You can load a new document by setting the Window.location property.
You can clear the document pane (and remove the text, form elements, and so on so they do not redisplay) with these statements:
document.close();
document.open();
document.write(); You can omit the document.open call if you are writing text or HTML, since write does an implicit open of that MIME type if the document stream is closed.
You can refer to the anchors, forms, and links of a document by using the anchors, forms, and links arrays. These arrays contain an entry for each anchor, form, or link in a document and are properties of the document object.
Do not use location as a property of the document object; use the document.URL property instead. The document.location property, which is a synonym for document.URL, will be removed in a future release.