HTML and CSS Reference
Figure 11.3 Document properties: Link turns purple after “thanks.html” has been visited.
Figure 11.4 After the user clicks the link, this page is displayed.
The document Object Methods. The document object has methods to tell the
object how to behave or what to do. Table 11.3 lists these methods. We have used the
write() and writeln() methods throughout this text to send output to the screen dynam-
ically, as shown here:
Methods, like properties, use the dot syntax to define the object they are manipulat-
ing; for instance, document.clear() or window.open(). (The parentheses differentiate a
method from a property.)
Table 11.3 Methods of the document Object
What It Does
Clears the current document window.
Closes the document window for writing.