JavaScript Document Functions

EditRocket provides the following information on Document functions in the JavaScript source code builder.

close () - Closes an output stream opened with the document.open() method, and displays the collected data

getElementById (id) - Returns a reference to the first object with the specified id

getElementsByName (name) - Returns a collection of objects with the specified name

getElementsByTagName (tagname) - Returns a collection of objects with the specified tagname

open ([mimetype[,replace]]) - Opens a stream to collect the output from any document.write() or document.writeln() methods

write (expression) - Writes HTML expressions or JavaScript code to a document

writeln (expression) - Identical to the write() method, with the addition of writing a new line character after each expression