JavaScript Reference/Event Handlers Reference/onBeforePrint
Содержание
"onBeforePrint" Example
<source lang="javascript">
<head> <script language="JavaScript">
function function1() { window.print(); }
</script> </head> <body onbeforeprint="alert("This page is about to be printed")">
Some body Content to print.
<input type="button" value="Print" onclick="function1()">
</body> </html>
</source>
"onBeforePrint" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<body> <frameset> | | |window | +----------------+--------------------------------------------------------------+
</source>
"onBeforePrint" Properties
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Properties |altKey altLeft | | |button cancelBubble | | |clientX clientY | | |ctrlKey ctrlLeft | | |returnValue screenX | | |screenY shiftKey | | |shiftLeft srcElement | | |type x | | |y | +----------------+--------------------------------------------------------------+
</source>
"onBeforePrint" Syntax and Note
<source lang="javascript">
Note:
This event fires before the document prints.
</source>