dom 노드 (클론)
3678 단어 클 라 이언 트 js
```bash
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<ul>
<li>1111</li>
<li>2</li>
<li>3</li>
</ul>
<script>
var ul = document.querySelector('ul');
// 1. node.cloneNode(); false
// 2. node.cloneNode(true); true
var lili = ul.children[0].cloneNode(true);
ul.appendChild(lili);
</script>
</body>
</html>