From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/api/document/head/index.html | 69 +++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 files/ko/web/api/document/head/index.html (limited to 'files/ko/web/api/document/head') diff --git a/files/ko/web/api/document/head/index.html b/files/ko/web/api/document/head/index.html new file mode 100644 index 0000000000..6beb5b59a3 --- /dev/null +++ b/files/ko/web/api/document/head/index.html @@ -0,0 +1,69 @@ +--- +title: Document.head +slug: Web/API/Document/head +tags: + - API + - Document + - HTML DOM + - Property + - Reference +translation_of: Web/API/Document/head +--- +
{{APIRef("DOM")}}
+ +

{{domxref("Document")}} 인터페이스의 head 읽기 전용 속성은 현재 문서의 {{htmlelement("head")}} 요소를 나타냅니다.

+ +

예제

+ +
<!doctype html>
+<head id="my-document-head">
+  <title>Example: using document.head</title>
+</head>
+
+<script>
+  let theHead = document.head;
+
+  console.log(theHead.id); // "my-document-head";
+  console.log(theHead === document.querySelector("head")); // true
+</script>
+ +

참고

+ +

Document.head는 읽기 전용입니다. 값을 할당하려고 시도하면 조용히 실패하거나, 엄격 모드에서는 {{jsxref("TypeError")}}가 발생합니다.

+ +

명세

+ + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG','dom.html#dom-document-head','Document.head')}}{{Spec2('HTML WHATWG')}}Initial definition.
{{SpecName('HTML5.1','dom.html#dom-document-head','Document.head')}}{{Spec2('HTML5.1')}} 
{{SpecName('HTML5 W3C','dom.html#dom-document-head','Document.head')}}{{Spec2('HTML5 W3C')}} 
+ +

브라우저 호환성

+ +

{{Compat("api.Document.head")}}

+ +

같이 보기

+ + -- cgit v1.2.3-54-g00ecf