From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/api/document/documenturi/index.html | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 files/zh-cn/web/api/document/documenturi/index.html (limited to 'files/zh-cn/web/api/document/documenturi') 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 +--- +
{{ApiRef("DOM")}}
+ +
{{domxref("Document")}} 接口的属性 documentURI 以字符串的形式返回文档的位置(location)。
+ +
 
+ +
在最初的DOM3定义中,这个属性是可读/写的。在现代的DOM标准(DOM4)中,它是只读的。
+ +
 
+ +

语法

+ +
var string = document.documentURI;
+
+ +

备注

+ +

HTML 文档有一个 {{domxref("document.URL")}} 属性返回同样的值。但是不像 URLdocumentURI 适用于所有类型的文档。

+ +

规范

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-document-documenturi','documentURI')}}{{Spec2('DOM WHATWG')}} 
{{SpecName('DOM3 Core', '#Document3-documentURI', 'documentURI')}}{{Spec2('DOM3 Core')}}Initial definition
+ +

浏览器兼容性

+ + + +

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

-- cgit v1.2.3-54-g00ecf