The Document object has a number of properties each of which is actually an Array object for the corresponding elements in the document in their order of appearance. This includes the following properties:

  • .anchors. <a name="anchor">
  • .applets. <applet>
  • .embeds. The plugin objects supported by the browser.
  • .forms. <form>
  • .images. <img>
  • .links. <a href="link">


.write "Code to put on the HTML page". Puts text at the location where the script is executing. This is probably the most common JS object.method combo.

.writeln(expr1[,...exprn]). Just like .write but it add a newline (line feed or ASCII 10) character at the end.

.clear(). Clears the document window.

GeorgeHernandez.comSome rights reserved