Level 95
Level 97
43 words 0 ignored
Ready to learn
Ready to review
Ignore words
Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.
Ignore?
What is the document object with the HTML DOM?
With the HTML DOM, the document object is your web page.
What does the document object represent in the HTML DOM object model?
In the HTML DOM object model, the document object represents your web page.
What is the document object?
The document object is the owner of all other objects in your web page.
How do access objects in an HTML page?
If you want to access objects in an HTML page, you always start with accessing the document object.
Methods
actions that an object can perform
Method Description
Find an element by element id
document.getElementsByTagName()
Find elements by tag name
document.getElementsByClassName()
Find elements by class name
element.style.property=
Change the style of an HTML element
element.setAttribute(attribute,value)
Change the attribute of an HTML element
element.attribute=
Change the attribute of an HTML element
element.innerHTML=
Change the inner HTML of an element
document.createElement()
Create an HTML element
document.removeChild()
Remove an HTML element
document.appendChild()
Add an HTML element
document.replaceChild()
Replace an HTML element
document.write(text)
Write into the HTML output stream
document.getElementById(id).onclick=function(){code}
Adding event handler code to an onclick event
document.anchors
Returns all <a> elements that have a name attribute
document.applets
Returns all <applet> elements (Deprecated in HTML5)
document.baseURI
Returns the absolute base URI of the document
document.body
Where is the body element located?
document.cookie
What property can be used to get and set cookies? What format should be used when setting the property?
document.doctype
Returns the document's doctype
document.documentElement
Returns the <html> element
document.documentMode
Returns the mode used by the browser
document.documentURI
Returns the URI of the document
document.domain
Returns the domain name of the document server
document.domConfig Obsolete.
Returns the DOM configuration
document.embeds
Returns all <embed> elements
document.forms
Returns all <form> elements
document.head
Returns the <head> element
document.images
Returns all <img> elements
document.implementation
Returns the DOM implementation
document.inputEncoding
Returns the document's encoding (character set)
document.lastModified
Returns the date and time the document was updated
document.links
Returns all <area> and <a> elements that have a href attribute
document.readyState
Returns the (loading) status of the document
document.referrer
Returns the URI of the referrer (the linking document)
document.scripts
Returns all <script> elements
document.strictErrorChecking
Returns if error checking is enforced
document.title
Returns the <title> element
document.URL
Returns the complete URL of the document