1.创建一个新的元素
相关函数:createElement(),appendChild(),insertBefore()
示例:创建一个p标签,并且在标签中添加内容
appendChild()的作用是在新元素的尾部添加内容,而使用insertBefore()可以在开始位置添加内容
2.删除某个元素
remove()
删除某一个元素时,你必须知道该元素的父元素
3.查找某个元素
1.id查询
getElementById()
2.class查询
getElementByClassName()
3.name查询
getElementByName()
4.替换某个元素
replaceChild()