Document Object
The 1.document object is a Child of the Window object, can be used directly, and is used to get HTML page elements
2.document Object Properties
A) Alinkcolor activity link Color
b) LinkColor text link color
c) Vlinkcolor User has observed the text color of a document link
d) Cookie information stored on the client by the cookie
i. Some small text files that some Web sites store users ' information on their hard drives
Ii.cookie can record user's user name, password, page visited, time of stay, etc., so as to facilitate the user's operation again .
the information in the Iii.cookie is stored as a "key - value" pair, and its information can only be a character in the URL encoding, if there is a Chinese need to convert the Chinese character, that is, in the client store Cookies can only be information that consists of numbers and letters
Iv. If you want to delete a cookie, you can modify its date to expire automatically .
3.document Object Methods
A) clear the specified document content -- not recommended
I.docobj.clear ()-- no parameters, no return value
Ii. closing the document flow and then opening the document stream the contents of the document are automatically erased.
b) Close the document flow
I.docobj.close ()-- no parameters, no return value
II. The method is automatically executed when the page is loaded
II. When the Write() method is called to dynamically generate the page,the system waits until the close () method is not
Iv. when the OnLoad event is added to a window , the onload event is not triggered when the close() method is not called
c) Open Document flow
I.docobj.open ([arg])--arg represents the MIME type of the output stream , default text/html; no return value
d) write text to document
I.docobj.write (HTMLSTR)
II. the output stream needs to be closed using close() after the output is finished, otherwise theoutput will be appended when the Write () method is called again
e) Write text to document and wrap
I.docobj.writeln (str)
JavaScript Document Object