HTML DOM 본문 개체
바디 오브젝트
Body 객체는 HTML <body> 요소를 나타냅니다.
본문 개체에 액세스
getElementsByTagName()을 사용하여 <body> 요소에 액세스할 수 있습니다.
예시
var x = document.getElementsByTagName("BODY")[0];
팁: document.body 속성 을 사용하여 <body> 요소에 액세스할 수도 있습니다 .
몸체 개체 만들기
document.createElement() 메서드를 사용하여 <body> 요소를 만들 수 있습니다.
var x = document.createElement("BODY");
몸체 객체 속성
Property | Description |
---|---|
aLink | Not supported in HTML5. See CSS :active Selector instead.
Sets or returns the color of an active link in a document |
background | Not supported in HTML5. Use style.backgroundImage instead. Sets or returns the background image for a document |
bgColor | Not supported in HTML5. Use style.backgroundColor instead. Sets or returns the background color of a document |
link | Not supported in HTML5. See CSS :link Selector instead. Sets or returns the color of unvisited links in a document |
text | Not supported in HTML5. Use style.color instead. Sets or returns the color of the text in a document |
vLink | Not supported in HTML5. See CSS :visited Selector instead.
Sets or returns the color of visited links in a document |
표준 속성 및 이벤트
Body 객체는 표준 속성 과 이벤트 도 지원합니다 .
관련 페이지
HTML 참조: HTML <body> 태그