Document Methods and Properties
The methods and properties
in this section are implemented for the document
object. Methods and properties already covered in the previous section are not repeated again.
Methods
Method |
Description |
---|---|
|
Empties the document |
|
Ends the write access to the document |
|
Creates an attribute with the given name |
|
Creates a document fragment |
|
Creates an element with the given tag name |
|
Creates a text node with the given text |
|
Returns the element with the given ID |
|
Returns all elements with the given name |
|
Opens the document for write access, sets the MIME type, and if the optional |
|
Writes data to the document |
|
Writes data and a linefeed ( |
Properties
Property |
Description |
---|---|
|
Color for active links |
|
List of all anchors in the document |
|
List of all Java applets in the document |
|
Background color of the document |
|
Body portion of the document |
|
Whether the rendering engine uses a compatibility mode for older content |
|
Cookies the document can access |
|
DOM node for the document |
|
Domain of the document ... |
Get Programming Atlas now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.