From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/document/hidden/index.html | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 files/zh-cn/web/api/document/hidden/index.html (limited to 'files/zh-cn/web/api/document/hidden') diff --git a/files/zh-cn/web/api/document/hidden/index.html b/files/zh-cn/web/api/document/hidden/index.html new file mode 100644 index 0000000000..f9db5934d8 --- /dev/null +++ b/files/zh-cn/web/api/document/hidden/index.html @@ -0,0 +1,44 @@ +--- +title: Document.hidden +slug: Web/API/Document/hidden +translation_of: Web/API/Document/hidden +--- +

{{ ApiRef("DOM") }}

+ +

Document.hidden (只读属性)返回布尔值,表示页面是(true)否(false)隐藏。

+ +

语法

+ +
var string = document.hidden
+ +

例子

+ +
document.addEventListener("visibilitychange", function() {
+  console.log( document.hidden );
+  // Modify behavior...
+});
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Page Visibility API','#dom-document-hidden', 'Document.hidden')}}{{Spec2('Page Visibility API')}}Initial definition.
+ +

浏览器兼容性

+ + + +
+

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

+
-- cgit v1.2.3-54-g00ecf