节点操作
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>
<p>1</p>
<p class="two">2</p>
<p>3</p>
</div>
<a href="#">shouye</a>
</body>
<script>
var div = document.querySelector("div")
var a = document.querySelector("a")
var p = div.firstElementChild
var p = div.firstElementChild
console.log(p.nextElementSibling)
console.log(p.previousElementSibling)
console.log(p.parentNode)
div.appendChild(a)
var a1 = a.cloneNode()
div.appendChild(a1)
var span = document.createElement("span")
div.append(span)
p.remove()
div.removeChild(p)
</script>
</html>