HTML5 onafterprint 事件属性
标签" href="tag-main.html"><main>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<html>
<picture>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
< template>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
HTML5 onafterprint 事件属性
实例
在页面设置打印及打印对话框出现后执行 JavaScript :
<body onafterprint="printmsg()">
浏览器支持
| 事件属性 | |||||
|---|---|---|---|---|---|
| onafterprint | 63 | 12 | 6 | 13 | 50 |
注意: 在 IE 浏览器中, onafterprint 属性在打印对话框之前执行 JavaScript 而不是之后。
定义和用法
onafterprint 属性在用户设置页面打印及打印对话框出现后触发。
提示: onafterprint 属性通常与 onbeforeprint 属性一起使用。
HTML 4.01 与 HTML5之间的差异
onafterprint 属性是HTML5新属性。
语法
<element onafterprint="script">
属性值
| 值 | 描述 |
|---|---|
| script | 在onafterprint中执行的脚本。 |
HTML 事件属性