aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/document/url
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/document/url
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/document/url')
-rw-r--r--files/zh-cn/web/api/document/url/index.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/url/index.html b/files/zh-cn/web/api/document/url/index.html
new file mode 100644
index 0000000000..b9c10a984d
--- /dev/null
+++ b/files/zh-cn/web/api/document/url/index.html
@@ -0,0 +1,17 @@
+---
+title: document.URL
+slug: Web/API/Document/URL
+translation_of: Web/API/Document/URL
+---
+<p>{{ ApiRef() }}</p>
+<h3 id="Summary" name="Summary">概述</h3>
+<p>返回当前文档的URL地址</p>
+<h3 id="Syntax" name="Syntax">语法</h3>
+<pre class="eval"><em>string</em> = document.URL
+</pre>
+<h3 id="Notes" name="Notes">备注</h3>
+<p><code>该属性的值和</code>DOM Level 0中的<code>document.location.href</code> 属性的值是相等的.然而 <code>document.location.href</code> 是可写的, <code>document.URL</code> 是只读的.</p>
+<p>{{ domxref("document.documentURI") }} 也返回与该属性相同的值,不过它在非HTML文档中也可以使用.</p>
+<h3 id="Specification" name="Specification">规范</h3>
+<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-46183437">DOM Level 2 HTML: URL</a></p>
+<p>{{ languages( { "es": "es/DOM/document.URL", "ja": "ja/DOM/document.URL", "pl": "pl/DOM/document.URL", "en": "en/DOM/document.URL" } ) }}</p>