[API/Framework]

Framework > DOM > Element

DOM Element

개요

DOM Element는 특정 노드를 중심으로 지정한 위치에 HTMLElement를 첨부하는 기능을 제공합니다.
html 형태로 작성된 스크립트를 HTMLElement로 생성, 특정 HTMLElement를 remove, replace하는 기능을 제공합니다.

Method

Method this.chain
insertAhead (HTMLElement/String target, HTMLElement/String el) HTMLElement
기준 엘리먼트 바로 앞에 형제 노드로 target을 삽입합니다.
insertAfter (HTMLElement/String target, HTMLElement/String el) HTMLElement
기준 엘리먼트 다음의 첫 번째 형제 노드로 target을 삽입합니다.
appendEnd (HTMLElement/String target, HTMLElement/String el) HTMLElement
기준 엘리먼트의 마지막 차일드 엘리먼트로 target을 첨부합니다.
insertBegin (HTMLElement/String target, HTMLElement/String el) HTMLElement
기준 엘리먼트의 firstChild 노드 앞에 target을 삽입합니다.
insertElement (String adjacent, HTMLElement/String target, HTMLElement/String el) HTMLElement
엘리먼트를 지정한 위치에 insert 합니다.
createAppend (String tag, String /Boolean id, String prefix, HTMLElement/String parentElement) HTMLElement
엘리먼트를 생성하여 차일드 엘리먼트로 첨부합니다.
beforeBegin (String content, HTMLElement/String el) HTMLElement
기준 엘리먼트 바로 앞에 형제 노드로 content 실행 결과를 삽입합니다.
afterEnd (String content, HTMLElement/String el) HTMLElement
기준 엘리먼트 다음의 첫 번째 형제 노드로 content 실행 결과를 삽입합니다.
beforeEnd (String content, HTMLElement/String el, Boolean child) HTMLElement
기준 엘리먼트의 마지막 차일드 엘리먼트로 content 실행 결과를 첨부합니다.
afterBegin (String content, HTMLElement/String el) HTMLElement
기준 엘리먼트의 firstChild 노드 앞에 content 실행 결과를 삽입합니다.
insertHTML (String adacent, String content, HTMLElement/String el) HTMLElement
HTML 스크립트를 지정한 위치에 설정합니다
removeElement (HTMLElement/String el, Boolean child) HTMLElement
지정한 엘리먼트와 차일드 엘리먼트를 삭제합니다.
removeChild (HTMLElement/String el) HTMLElement
지정한 엘리먼트의 차일드 엘리먼트를 모두 삭제합니다.
replaceElement (HTMLElement/String target, HTMLElement/String el) HTMLElement
지정한 엘리먼트와 차일드 엘리먼트를 target으로 대체합니다.
replaceChild (HTMLElement/String target, HTMLElement/String el) HTMLElement
지정한 element의 차일드 엘리먼트를 target으로 대체합니다.
getSelected (String type, HTMLElement/String el) Array
조건을 지정하여 <option> 엘리먼트의 Element, value, text, index를 추출합니다.
getOpts (HTMLElement/String el) Array
<option> 엘리먼트의 id, value, text, selected를 전부 추출합니다.
addSelect (Number/Null index, Hash hash, HTMLElement/String el) Hash
<option> Element를 생성하여 지정한 index에 삽입합니다.
removeSelect (Number/String index, HTMLElement/String el) Array
지정한 index 번째의 <option> Element를 삭제합니다.
getRadio (String attr, Boolean check) Element/Array
radio 엘리먼트에서 checked된 엘리먼트를 추출 합니다.