[API/Framework]

Framework > DOM > Attribute

Attribute

개요

Attribute는 native DOM의 확장이며 속성 처리를 위한 기능을 제공합니다.

Method

Method this.chain
getAttr (String/Array/Hash Attr, HTMLElement/String el, Boolean one) Hash/String
HTMLElement의 Attribute 값을 반환합니다.
setAttr (Hash hash, HTMLElement/String el) Hash
HTMLElement의 Attribute에 값을 설정합니다.
removeAttr (String/Array/Hash hash, HTMLElement/String el) Hash
HTMLElement의 Attribute를 삭제합니다.
getValue (HTMLElement/String el, Boolean rv) String
HTMLElement의 value 속성 값을 반환합니다.
setValue (String value, HTMLElement/String el) String
HTMLElement의 value 속성 값을 설정합니다.
getText (HTMLElement/String el) String
HTMLElement의 text 값을 반환합니다.
setText (String text, HTMLElement/String el) String
HTMLElement의 text 값을 설정합니다.
hasClass (String csname, HTMLElement/String el) Boolean
className의 존재 여부를 체크합니다.
addClass (String/Array csname, HTMLElement/String el) Array
this 엘리먼트의 class에 className을 추가합니다. 이미 존재하면 추가하지 않습니다.
removeClass (String/Array csname, HTMLElement/String el) Array
HTMLElement의 class에서 className을 삭제합니다.
toggleClass (String csname, HTMLElement/String el) Array
this 엘리먼트의 class에 className이 존재하면 이를 삭제하고, 아니면 추가합니다.
replaceClass (String/Array base, String replace, HTMLElement/String el) Array
base에 지정한 className을 replace에 지정한 className으로 대체합니다.
eachAttr (HTMLElement/String/Array el, String/Array pty, Function fn, Object scope) Array
HTMLElement에서 지정한 프로퍼티의 값을 추출하여 함수를 실행합니다.
getAttrNodes (String attr, HTMLElement/String el) Array
지정한 노드와 차일드 노드에서 지정한 속성이 같은 속성값을 배열로 반환합니다.