Getting a text node from the tableThis example introduces two new DOM attributes. First it uses the
If your object is a text node, you can use the data attribute and retrieve the text content of the node.
mybody = document.getElementsByTagName("body")[0]; Getting an attribute valueAt the end of sample1 there is a call to setAttribute on the mytable object. This call was used to set the border property of the table. To retrieve the value of the attribute, use the getAttribute method: mytable.getAttribute("border"); [링크 : https://developer.mozilla.org/en/traversing_an_html_table_with_javascript_and_dom_interfaces] |
'Programming > javascript & HTML' 카테고리의 다른 글
javascript - DOM inspector in Firefox (0) | 2010.08.19 |
---|---|
HTML의 style="filter:filter_name()" (0) | 2010.08.06 |
javascript - IE8 의 window의 on methods (2) | 2010.07.29 |
javascript - innerHTML은 웹표준이 아니라고? (2) | 2010.07.29 |
javascript - getElementsByTagName() (0) | 2010.07.27 |