看板 humorless
作者 標題 HTML DOM properties & methods
時間 2010年07月30日 Fri. PM 02:40:57
HTML DOM Properties
Some DOM properties:
* x.innerHTML - the text value of x
* x.nodeName - the name of x
* x.nodeValue - the value of x
* x.parentNode - the parent node of x
* x.childNodes - the child nodes of x
* x.attributes - the attributes nodes of x
Note: In the list above, x is a node object (HTML element).
HTML DOM Methods
////////////
Some DOM methods:
* x.getElementById(id) - get the element with a specified id
* x.getElementsByTagName(name) - get all elements with a specified tag name
* x.appendChild(node) - insert a child node to x
* x.removeChild(node) - remove a child node from x
Note: In the list above, x is a node object (HTML element).
--
※ 來源: DISP BBS 看板: humorless 文章連結: http://disp.cc/b/124-gcL
※ 作者: humorless 來自: 118.168.23.16 時間: 2010-07-30 14:40:57
※ 看板: humorless 文章推薦值: 0 目前人氣: 0 累積人氣: 131
回列表(←)
分享