<li>
태그 element를 의미한다.interface HTMLLIElement : HTMLElement {
attribute DOMString type;
attribute long value;
};
<a>
태그 element를 의미한다.interface HTMLAnchorElement : HTMLElement {
attribute DOMString accessKey;
attribute DOMString charset;
attribute DOMString coords;
attribute DOMString href;
attribute DOMString hreflang;
attribute DOMString name;
attribute DOMString rel;
attribute DOMString rev;
attribute DOMString shape;
attribute long tabIndex;
attribute DOMString target;
attribute DOMString type;
void blur();
void focus();
};
<input>
태그 element를 의미한다.interface HTMLInputElement : HTMLElement {
attribute DOMString defaultValue;
attribute boolean defaultChecked;
readonly attribute HTMLFormElement form;
attribute DOMString accept;
attribute DOMString accessKey;
attribute DOMString align;
attribute DOMString alt;
attribute boolean checked;
attribute boolean disabled;
attribute long maxLength;
attribute DOMString name;
attribute boolean readOnly;
// Modified in DOM Level 2:
attribute unsigned long size;
attribute DOMString src;
attribute long tabIndex;
// Modified in DOM Level 2:
attribute DOMString type;
attribute DOMString useMap;
attribute DOMString value;
void blur();
void focus();
void select();
void click();
};
출처 : https://web.stanford.edu/class/cs98si/slides/the-document-object-model.html
예시
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<li>html</li>
<li>css</li>
<li>javascript</li>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
var li = document.getElementsByTagName('li');
for(var i=0;i<li.length;i++){
$(li[i]).css('color','red');
}
</script>
</body>
</html>