aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/element/id/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/api/element/id/index.html')
-rw-r--r--files/ko/web/api/element/id/index.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/files/ko/web/api/element/id/index.html b/files/ko/web/api/element/id/index.html
new file mode 100644
index 0000000000..9c9f343239
--- /dev/null
+++ b/files/ko/web/api/element/id/index.html
@@ -0,0 +1,67 @@
+---
+title: Element.id
+slug: Web/API/Element/id
+translation_of: Web/API/Element/id
+---
+<div>{{ ApiRef("DOM") }}</div>
+
+<div> </div>
+
+<p><strong><code>Element.id</code></strong> 속성은 요소의 식별자를 나타내며, HTML의 전역적인 id 속성을 반영합니다.</p>
+
+<p>이 값은 도큐먼트 내에서 유일해야 하며, 종종 {{domxref("document.getElementById", "getElementById")}}를 사용하여 요소를 찾아내는데 사용됩니다. <code>id</code> 속성을 이용하는 다른 보편적인 방법에는 <a href="/en-US/docs/Web/CSS" title="CSS">CSS</a>로 도큐먼트를 스타일링 할때 <a href="/en-US/docs/Web/CSS/ID_selectors" title="Web/CSS/ID_selectors">ID를 선택자로 사용</a>하는 방법이 있습니다. </p>
+
+<div class="note">
+<p><strong>Note</strong>: 식별자는 대소문자를 구분하지만, 그래도 ID를 대소문자만 다르게 생성해서는 안됩니다.  (<a href="/en-US/docs/Case_Sensitivity_in_class_and_id_Names" title="Case_Sensitivity_in_class_and_id_Names">클래스명과 식별자에서의 대소문자 구분</a>참고).</p>
+</div>
+
+<h2 id="Syntax" name="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">var <em>idStr</em> = <em>elt</em>.id; // 아이디를 가져옵니다.
+<em>elt</em>.id = <em>idStr; // 아이디를 부여합니다</em>
+</pre>
+
+<ul>
+ <li><em><code>idStr</code></em>는 요소의 식별자입니다.</li>
+</ul>
+
+<h2 id="Specification" name="Specification">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-element-id', 'id')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>No change from {{SpecName('DOM2 HTML')}}.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM2 HTML', 'html.html#ID-63534901', 'id')}}</td>
+ <td>{{Spec2('DOM2 HTML')}}</td>
+ <td>No change from {{SpecName('DOM1')}}.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM1', 'level-one-html.html#ID-63534901', 'id')}}</td>
+ <td>{{Spec2('DOM1')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.Element.id")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>The DOM <a href="/en-US/docs/Web/HTML/Global_attributes/id"><strong>id</strong></a> global attribute.</li>
+</ul>