HTML DOM Caption 객체
Caption 객체
Caption 객체는 HTML <caption> 요소를 대표합니다。
Caption 객체 접근
getElementById()를 사용하여 <caption> 요소에 접근할 수 있습니다:
var x = document.getElementById("myCaption");
Caption 객체 생성
document.createElement() 메서드를 사용하여 <caption> 요소를 생성할 수 있습니다:
var x = document.createElement("CAPTION");
ヒント:Table 객체의 createCaption 메서드를 사용하여 <caption> 요소를 생성할 수 있습니다.
Caption 객체 속성
속성 | 설명 |
---|---|
align |
HTML5는 지원하지 않습니다. 다른 것을 사용하십시오. style.textAlign 또는 style.captionSide。 제목의 정렬 방식을 설정하거나 반환합니다. |