diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/document/documenturi | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/document/documenturi')
-rw-r--r-- | files/zh-cn/web/api/document/documenturi/index.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/documenturi/index.html b/files/zh-cn/web/api/document/documenturi/index.html new file mode 100644 index 0000000000..f3efc6002b --- /dev/null +++ b/files/zh-cn/web/api/document/documenturi/index.html @@ -0,0 +1,55 @@ +--- +title: document.documentURI +slug: Web/API/Document/documentURI +tags: + - API + - DOM + - Document +translation_of: Web/API/Document/documentURI +--- +<div>{{ApiRef("DOM")}}</div> + +<div>{{domxref("Document")}} 接口的属性 <code><strong>documentURI</strong></code> 以字符串的形式返回文档的位置(location)。</div> + +<div> </div> + +<div>在最初的DOM3定义中,这个属性是可读/写的。在现代的DOM标准(DOM4)中,它是只读的。</div> + +<div> </div> + +<h2 id="Syntax" name="Syntax">语法</h2> + +<pre class="syntaxbox"><code>var string = document.documentURI;</code> +</pre> + +<h2 id="Notes" name="Notes">备注</h2> + +<p>HTML 文档有一个 {{domxref("document.URL")}} 属性返回同样的值。但是不像 <code>URL</code>,<code>documentURI</code> 适用于所有类型的文档。</p> + +<h2 id="Specification" name="Specification">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('DOM WHATWG', '#dom-document-documenturi','documentURI')}}</td> + <td>{{Spec2('DOM WHATWG')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('DOM3 Core', '#Document3-documentURI', 'documentURI')}}</td> + <td>{{Spec2('DOM3 Core')}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("api.Document.documentURI")}}</p> |