댓글 검색 목록

[javascript] 다른 요소 뒤에 요소 삽입

페이지 정보

작성자 운영자 작성일 20-05-10 14:59 조회 609 댓글 0
const insertAfter = (ele, anotherEle) => anotherEle.parentNode.insertBefore(ele, anotherEle.nextSibling);

// Or
const insertAfter = (ele, anotherEle) => anotherEle.insertAdjacentElement('afterend', ele);

댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.