HTML DOM 캡션 개체
캡션 개체
Caption 개체는 HTML <caption> 요소를 나타냅니다.
캡션 개체에 액세스
getElementById()를 사용하여 <caption> 요소에 액세스할 수 있습니다.
예시
var x = document.getElementById("myCaption");
캡션 개체 만들기
document.createElement() 메서드를 사용하여 <caption> 요소를 만들 수 있습니다.
예시
var x = document.createElement("CAPTION");
팁: Table 개체 의 createCaption 메서드 를 사용하여 <caption> 요소를 만들 수도 있습니다 .
캡션 개체 속성
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign or
style.captionSide instead. Sets or returns the alignment of the caption |
표준 속성 및 이벤트
Caption 개체는 표준 속성 및 이벤트 도 지원합니다 .
관련 페이지
HTML 튜토리얼: HTML 테이블
HTML 참조: HTML <caption> 태그
JavaScript 참조: HTML DOM 테이블 객체