aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/document/url/index.html
blob: 527d754ddfb23c2ad77083b1b2f344c3a3fe6cad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: Document.URL
slug: Web/API/Document/URL
tags:
  - API
  - Document
  - HTML DOM
  - Property
  - Reference
translation_of: Web/API/Document/URL
---
<div>{{APIRef("DOM")}}</div>

<p>{{domxref("Document")}} 인터페이스의 <code><strong>URL</strong></code> 읽기 전용 속성은 문서의 주소를 문자열로 반환합니다.</p>

<h2 id="예제">예제</h2>

<h3 id="JavaScript">JavaScript</h3>

<pre class="brush: js">document.getElementById("url").textContent = document.URL;</pre>

<h3 id="HTML">HTML</h3>

<pre class="brush: html">&lt;p id="urlText"&gt;
  URL:&lt;br/&gt;
  &lt;span id="url"&gt;URL이 여기 보입니다&lt;/span&gt;
&lt;/p&gt;</pre>

<h3 id="결과">결과</h3>

<p>{{EmbedLiveSample("예제", "100%", 100)}}</p>

<h2 id="명세">명세</h2>

<table class="spectable 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-document-url", "Document.URL")}}</td>
   <td>{{Spec2("DOM WHATWG")}}</td>
   <td>Defines that the property is a {{domxref("USVString")}} instead of a {{domxref("DOMString")}}.</td>
  </tr>
  <tr>
   <td>{{SpecName("DOM1", "level-one-html.html#attribute-URL", "Document.URL")}}</td>
   <td>{{Spec2("DOM1")}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<div>


<p>{{Compat("api.Document.URL")}}</p>
</div>

<h2 id="같이_보기">같이 보기</h2>

<ul>
 <li>{{domxref("HTMLDocument")}}</li>
</ul>