티스토리 뷰
HTML DOM Objects - Methods and Properties
Some commonly used HTML DOM methods:
- getElementById(id) - get the node (element) with a specified id
- appendChild(node) - insert a new child node (element)
- removeChild(node) - remove a child node (element)
Some commonly used HTML DOM properties:
- innerHTML - the text value of a node (element)
- parentNode - the parent node of a node (element)
- childNodes - the child nodes of a node (element)
- attributes - the attributes nodes of a node (element)
You will learn more about properties in the next chapter of this tutorial.
A Real Life Object Illustration:
A person is an object.
A person's methods could be eat(), sleep(), work(), play(), etc.
All persons have these methods, but they are performed at different times.
A person's properties include name, height, weight, age, eye color, etc.
All persons have these properties, but their values differ from person to person.
* source : http://www.w3schools.com/
'■ 프론트엔드 ■ > HTML' 카테고리의 다른 글
innerHTML (0) | 2013.10.13 |
---|---|
document.getElementsByName() - name접근 (0) | 2013.10.13 |
getElementById() - Method (0) | 2013.10.13 |
DOM이란? - Document Object Model (0) | 2013.10.13 |
HTML DOM - Tree (0) | 2013.10.13 |
댓글