그리고 lastChild와 lastElementChild의 차이
참고 : https://www.w3schools.com/jsref/met_node_clonenode.asp
HTML DOM cloneNode Method
HTML DOM cloneNode() Method Element Object Example Copy a
- element from one list to another: // Get the last
- element ("Milk") of
- with id="myList2" var itm = document.getElementById("myList2").lastChild; // Copy the
- element and its child
www.w3schools.com
- element and its child
'CSS&JS > 👀Study and Copy' 카테고리의 다른 글
웹 접근성 자가진단 (0) | 2020.09.25 |
---|---|
soft ui element 만들기 (엠보싱 효과/입체/ Neumorphic) (0) | 2020.02.14 |
insertAdjacentHTML 과 appendChild (0) | 2020.01.28 |
$(this).index(); 를 vanilla JS로 대체하기 (indexOf) (0) | 2020.01.28 |
vanilla JS로 prevAll, nextAll 대체 (0) | 2020.01.28 |