HTMLElement
HTMLElement 인터페이스는 모든 종류의 HTML 요소를 나타냅니다. 일부 요소는 이 인터페이스를 직접 구현하지만 나머지 요소는 HTMLElement를 상속한 자식 인터페이스를 구현합니다.
속성
부모인 Element의 속성을 상속합니다. GlobalEventHandlers, TouchEventHandlers의 속성을 구현합니다.
HTMLElement.accessKey-
요소에 할당된 접근 키를 나타내는
DOMString입니다. HTMLElement.accessKeyLabel읽기 전용-
요소에 할당된 접근 키를 포함하는
DOMString을 반환합니다. HTMLElement.contentEditable-
요소가 수정 가능하면
"true", 그렇지 않으면"false"값을 갖는DOMString입니다. HTMLElement.isContentEditable(en-US) 읽기 전용-
요소의 콘텐츠가 수정 가능한지 여부를 나타내는
Boolean을 반환합니다. -
요소와 관련된 콘텍스트 메뉴를 나타내는
HTMLMenuElement(en-US)입니다.null일 수 있습니다. HTMLElement.dataset(en-US) 읽기 전용-
요소의 사용자 지정 데이터 속성(
data-*)을 스크립트에서 읽고 쓸 수 있는DOMStringMap(en-US)을 반환합니다. HTMLElement.dir(en-US)-
요소의 방향성을 표현하는 전역 속성
dir을 나타내는DOMString을 반환합니다. 가능한 값은"ltr","rtl","auto"입니다. HTMLElement.draggable-
요소가 드래그 가능한지 여부를 나타내는
Boolean을 반환합니다. HTMLElement.dropzone읽기 전용-
dropzone전역 속성을 나타내고 drop 작업에 대한 동작을 설명하는DOMSettableTokenList를 반환합니다. -
요소가 숨김상태인지 여부를 나타내는
Boolean을 반환합니다. HTMLElement.inert(en-US)-
유저 에이전트가 사용자 인터렉션 이벤트, 페이지 내 텍스트 검색("페이지에서 찾기"), 텍스트 선택의 목적으로 주어진 노드가 없는 것처럼 동작해야하는지 여부를 나타내는
Boolean을 반환합니다. HTMLElement.innerText-
노드와 그 자손의 "렌더링된" 텍스트 컨텐츠를 나타냅니다. getter 로써, 이는 사용자가 커서로 요소의 컨텐츠를 하이라이팅한 후 클립보드로 복사하면 얻을 수 있는 텍스트와 유사합니다.
HTMLElement.itemScopeExperimental-
항목 스코프를 나타내는
Boolean입니다. HTMLElement.itemType읽기 전용 Experimental-
DOMSettableTokenList… 를 반환합니다. HTMLElement.itemIdExperimental-
항목 ID 를 나타내는
DOMString입니다. HTMLElement.itemRef읽기 전용 Experimental-
DOMSettableTokenList… 를 반환합니다. HTMLElement.itemProp읽기 전용 Experimental-
DOMSettableTokenList… 를 반환합니다. HTMLElement.itemValueExperimental-
항목 값을 나타내는
Object를 반환합니다. HTMLElement.lang(en-US)-
요소의 속성, 텍스트, 컨텐츠의 언어를 나타내는
DOMString입니다. HTMLElement.noModule-
임포트한 스크립트가 모듈 스크립트를 지원하는 유저 에이전트에서 실행될 수 있는지를 나타내는
Boolean입니다. HTMLElement.nonce(en-US)-
주어진 페치(fetch)의 진행을 허용할지를 결정하기 위한 컨텐츠 보안 정책(Content Security Policy)에서 한 번 사용된 암호회된 숫자를 반환합니다.
HTMLElement.offsetHeight(en-US) 읽기 전용 Experimental-
레이아웃에 상대적인 요소의 높이를 갖는
double을 반환합니다. HTMLElement.offsetLeft(en-US)읽기 전용 Experimental-
요소의 left border 부터
offsetParent의 left border 까지의 거리를double로 반환합니다. HTMLElement.offsetParent읽기 전용 Experimental-
모든 오프셋 계산이 현재 연산된 요소인
Element를 반환합니다. HTMLElement.offsetTop(en-US)읽기 전용 Experimental-
요소의 top border 부터
offsetParent의 top border 까지의 거리를double로 반환합니다. HTMLElement.offsetWidth(en-US)읽기 전용 Experimental-
레이아웃에 상대적인 요소의 너비를 갖는
double을 반환합니다. HTMLElement.properties읽기 전용 Experimental-
HTMLPropertiesCollection… 을 반환합니다. HTMLElement.spellcheck-
철자 검사를 제어하는
Boolean입니다. 모든 HTML 요소에 존재하지만, 모두에 대해 적용되지는 않습니다. HTMLElement.style(en-US)-
요소의 스타일 속성의 정의를 나타내는
CSSStyleDeclaration(en-US) 객체입니다. HTMLElement.tabIndex(en-US)-
탭 순서에서 요소의 위치를 나타내는
long입니다. HTMLElement.title(en-US)-
요소에 마우스를 오버할 때 팝업 상자에 표시되는 텍스트를 갖는
DOMString입니다. HTMLElement.translateExperimental-
번역을 나타내는
Boolean입니다.
이벤트 핸들러
onXYZ 형태의 대부분의 이벤트 핸들러 속성은 GlobalEventHandlers 또는 TouchEventHandlers 에 정의되어 있으며 HTMLElement 에 의해 구현되었습니다. 다음 HTMLElement 에 해당하는 핸들러입니다.
HTMLElement.oncopy(en-US) 비표준-
copy이벤트를 위한 이벤트 핸들링 코드를 반환합니다(Firefox bug 280959). HTMLElement.oncut(en-US) 비표준-
cut이벤트를 위한 이벤트 핸들링 코드를 반환합니다(Firefox bug 280959). HTMLElement.onpaste(en-US) 비표준-
paste이벤트를 위한 이벤트 핸들링 코드를 반환합니다(Firefox bug 280959). TouchEventHandlers.ontouchstart비표준-
touchstart (en-US)이벤트를 위한 이벤트 핸들링 코드를 반환합니다. TouchEventHandlers.ontouchend비표준-
touchend (en-US)이벤트를 위한 이벤트 핸들링 코드를 반환합니다. TouchEventHandlers.ontouchmove비표준-
touchmove (en-US)이벤트를 위한 이벤트 핸들링 코드를 반환합니다. TouchEventHandlers.ontouchenter비표준-
touchenter이벤트를 위한 이벤트 핸들링 코드를 반환합니다. TouchEventHandlers.ontouchleave비표준-
touchleave이벤트를 위한 이벤트 핸들링 코드를 반환합니다. TouchEventHandlers.ontouchcancel비표준-
touchcancel (en-US)이벤트를 위한 이벤트 핸들링 코드를 반환합니다.
메서드
부모인 Element의 메서드를 상속합니다.
HTMLElement.blur()(en-US)-
현재 포커스된 요소로부터 키보드 포커스를 제거합니다.
HTMLElement.click()-
요소로 마우스 클릭 이벤트를 전달합니다.
HTMLElement.focus()(en-US)-
요소에 현재 키보드 포커스를 생성합니다.
HTMLElement.forceSpellCheck()(en-US) Experimental-
요소에 철자 확인자를 생성합니다.
이벤트
Animation events
animationcancel-
Fired when an animation unexpectedly aborts. Also available via the
onanimationcancelproperty. animationend-
Fired when an animation has completed normally. Also available via the
onanimationendproperty. animationiteration-
Fired when an animation iteration has completed. Also available via the
onanimationiterationproperty. animationstart-
Fired when an animation starts. Also available via the
onanimationstartproperty.
Input events
beforeinput-
Fired when the value of an
<input>,<select>, or<textarea>element is about to be modified. input-
Fired when the
valueof an<input>,<select>, or<textarea>element has been changed. Also available via theoninputproperty.
Pointer events
gotpointercapture-
Fired when an element captures a pointer using
setPointerCapture(). Also available via theongotpointercaptureproperty. lostpointercapture-
Fired when a captured pointer (en-US) is released. Also available via the
onlostpointercaptureproperty. pointercancel-
Fired when a pointer event is canceled. Also available via the
onpointercancelproperty. pointerdown-
Fired when a pointer becomes active. Also available via the
onpointerdownproperty. pointerenter-
Fired when a pointer is moved into the hit test boundaries of an element or one of its descendants. Also available via the
onpointerenterproperty. pointerleave-
Fired when a pointer is moved out of the hit test boundaries of an element. Also available via the
onpointerleaveproperty. pointermove-
Fired when a pointer changes coordinates. Also available via the
onpointermoveproperty. pointerout-
Fired when a pointer is moved out of the hit test boundaries of an element (among other reasons). Also available via the
onpointeroutproperty. pointerover-
Fired when a pointer is moved into an element's hit test boundaries. Also available via the
onpointeroverproperty. pointerup-
Fired when a pointer is no longer active. Also available via the
onpointerupproperty.
Transition events
transitioncancel-
Fired when a CSS transition (en-US) is canceled. Also available via the
ontransitioncancelproperty. transitionend-
Fired when a CSS transition (en-US) has completed. Also available via the
ontransitionendproperty. transitionrun-
Fired when a CSS transition (en-US) is first created. Also available via the
ontransitionrunproperty. transitionstart-
Fired when a CSS transition (en-US) has actually started. Also available via the
ontransitionstartproperty.
명세
| Specification |
|---|
| HTML Standard # htmlelement |
브라우저 호환성
BCD tables only load in the browser