diff options
Diffstat (limited to 'files/zh-cn/web/api/document/onvisibilitychange/index.html')
-rw-r--r-- | files/zh-cn/web/api/document/onvisibilitychange/index.html | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/files/zh-cn/web/api/document/onvisibilitychange/index.html b/files/zh-cn/web/api/document/onvisibilitychange/index.html deleted file mode 100644 index 22fb0e4db4..0000000000 --- a/files/zh-cn/web/api/document/onvisibilitychange/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Document.onvisibilitychange -slug: Web/API/Document/onvisibilitychange -translation_of: Web/API/Document/onvisibilitychange ---- -<div>{{ApiRef('DOM')}}</div> - -<p><code><strong>Document.onvisibilitychange</strong></code> 是一个事件处理方法,它将在该对象的 <code><strong>visibilitychange</strong></code>事件被触发时调用。</p> - -<h2 id="Syntax">Syntax</h2> - -<pre class="syntaxbox"><em>obj</em>.onvisibilitychange = <em>function</em>; -</pre> - -<ul> - <li><code>function</code> 是一个用户定义的方法的名字(而非带()和任何参数的函数调用),或者匿名函数的申明。</li> -</ul> - -<h2 id="例子">例子</h2> - -<pre class="brush: js">document.onvisibilitychange = function() { - console.log("Visibility of page has changed!"); -}; -</pre> - -<h2 id="标准">标准</h2> - -<table class="spectable standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('Page Visibility API','#onvisiblitychange-event-handler','onvisibilitychange')}}</td> - <td>{{Spec2('Page Visibility API')}}</td> - <td>Initial definition.</td> - </tr> - </tbody> -</table> - -<h2 id="浏览器兼容性">浏览器兼容性</h2> - - - -<p>{{Compat("api.Document.onvisibilitychange")}}</p> - -<h2 id="另见">另见</h2> - -<ul> - <li><a href="/en-US/docs/Web/API/Page_Visibility_API">Page Visibility API</a></li> -</ul> |