aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/windoweventhandlers
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/windoweventhandlers')
-rw-r--r--files/zh-cn/web/api/windoweventhandlers/onbeforeprint/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/api/windoweventhandlers/onbeforeprint/index.html b/files/zh-cn/web/api/windoweventhandlers/onbeforeprint/index.html
index a5673c741f..68d2085285 100644
--- a/files/zh-cn/web/api/windoweventhandlers/onbeforeprint/index.html
+++ b/files/zh-cn/web/api/windoweventhandlers/onbeforeprint/index.html
@@ -7,7 +7,7 @@ translation_of: Web/API/WindowEventHandlers/onbeforeprint
<div>{{domxref("WindowEventHandlers")}}的<code><strong>onbeforeprint</strong></code>属性是用于处理当前窗口的{{event("beforeprint")}}事件的{{event("Event_handlers", "event handler")}}。在打开打印对话窗口之前会触发这些事件。</div>
-<div></div>
+
<div><font><font>在</font></font><code>beforeprint</code><font><font>和</font></font>{{event("afterprint")}}<font><font>事件允许网页在打印开始前更改他们的内容(例如:可能是删除一个横幅),然后在打印完成后恢复这些更改。通常,您应该更喜欢使用</font></font><code><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Media_types">@media print</a></code><font><font>CSS规则,但是在某些情况下可能有必要使用这些事件。</font></font></div>