Data Object Model (DOM) Flashcards
1
Q
DOM defintion and process
A
shows the websites structure in form of a tree
It’s a cross-platform and language-independent application programming interface.
- When a web page is loaded, the browser creates a Document Object Model of the page.
- The HTML DOM model is constructed as a tree of Objects.
- With the object model, JavaScript gets all the power it needs to create dynamic HTML.
2
Q
The use of an HTML DOM for JavaScript
A
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
- most JS code manipulates elements on an HTML page
- we can examine elements’ state (e.g. see whether a box is checked)
- we can change state (e.g. insert some new text into a div)
- we can change styles (e.g. make a paragraph red)
3
Q
The 6 global DOM objects (+ respective descriptions)
A
4
Q
What are the DOM object properties?
A
5
Q
What are the DOM properties for form controls?
A
6
Q
How are DOM objects accessed?
A
7
Q
A