A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/ko/docs/Web/API/Document/documentElement below:

Document.documentElement - Web API | MDN

Document.documentElement

Baseline Widely available

Document.documentElement 읽기 전용 속성은 문서의 루트 요소를 나타내는 Element를 반환합니다. HTML 문서를 예로 들면 <html> 요소를 반환합니다.

구문
const element = document.documentElement;
예제
const rootElement = document.documentElement;
const firstTier = rootElement.childNodes;
// firstTier is a NodeList of the direct children of the root element
// such as <head> and <body>

for (const child of firstTier) {
  // do something with each direct child of the root element
}
참고

모든 비어있지 않은 HTML 문서의 documentElement는 항상 <html> 요소를 가리킵니다. 모든 비어있지 않은 XML 문서의 documentElement는 종류불문하고 해당 문서의 루트 요소를 가리킵니다.

명세 브라우저 호환성

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4