HTML DOM 출력 객체
출력 개체
Output 객체는 HTML <output> 요소를 나타냅니다.
참고: <output> 요소는 Internet Explorer/Edge에서 지원되지 않습니다.
출력 개체에 액세스
getElementById()를 사용하여 <output> 요소에 액세스할 수 있습니다.
예시
var x = document.getElementById("myOutput");
팁: 양식의 요소 컬렉션을 검색하여 <출력> 요소에 액세스할 수도 있습니다 .
출력 개체 만들기
document.createElement() 메서드를 사용하여 <output> 요소를 만들 수 있습니다.
예시
var x = document.createElement("OUTPUT");
출력 개체 속성
Property | Description |
---|---|
defaultValue | Sets or returns the default value of an <output> element |
form | Returns a reference to the form that contains the <output> element |
htmlFor | Returns the value of the for attribute of an <output> element |
labels | Returns a list of <label> elements associated with the <output> element |
name | Sets or returns the value of the name attribute of an <output> element |
type | Returns which type of HTML element the Output object represents |
value | Sets or returns the value of an <output> element |
표준 속성 및 이벤트
Output 객체는 표준 속성 과 이벤트 도 지원합니다 .
관련 페이지
HTML 참조: HTML <출력> 태그