DocumentObjectModel


Youngrok Pak at 5 years, 8 months ago.

DOM#

Node#

  • appendChild(newChild)
  • cloneNode(deep)
  • childNodes
  • nodeValue
  • nodeName
  • nodeType
  • parentNode
  • textContent
  • insertAfter(newChild, refChild)
  • removeChild(oldChild)
  • replaceChild(newChild, oldChild)

Document extends Node#

  • 전역 객체 document
  • createElement
  • createTextNode
  • getElementById(id)
  • getElementsByTagName(tagName)

Element extends Node#

  • getAttribute(attr), setAttribute(attr) = element.attr
  • nodeName => tagName

  • nodeValue => null

Text extends Node#

  • nodeName => null

  • nodeValue => text

DOMRange#

DOMSelection#


Comments




Wiki at WikiNamu