# DOM

## DOM操作

* Document Object Model
* DOM是哪种基本的数据结构
* DOM操作的常用API有哪些
* DOM节点的attr和property有和区别

### DOM的本质

* XML

```markup
<?xml version="1.0" encoding="UTF-8"?>
<note>
 <to>Tove</to>
 <from>Jani</from>
 <heading>Reminder</heading>
 <body>Dont forget me this weekend</body>
 <other>
 <a></a>
 <b></b>
 </other>
</note>
```

* HTML

```markup
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Document</title>
</head>
<body>
  <div>
    <p>this is p</p>
  </div>
</body>
</html>
```

## DOM知识解答

* DOM是哪种基本的数据结构?
  * 树
* DOM操作的常用API有哪些
  * 获取DOM节点，以及节点的`property`和`Attribute`
  * 获取父节点，获取子节点
  * 新增节点，删除节点
* `DOM节点`的`Attribute`和`property`有何区别
  * `property`只是一个`JS对象`的属性的修改
  * `Attribute`是对`html标签`属性的修改
* 重点总结
  * DOM本质
  * DOM节点的操作
  * DOM结构操作
