JavaScript Reference/Event Handlers Reference/onAfterPrint

Материал из Web эксперт
Перейти к: навигация, поиск

"onAfterPrint" Example

    
<head>
<script language="JavaScript">
   function function1() {
       window.print(); 
   } 
</script>
</head>
   <body onafterprint="alert("the printing of this page is complete")">
   <p>Some body Content to print.</p>
   <form>
   <input type="button" value="Print" onclick="function1()">
   </form>
</body>



"onAfterPrint" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<body>                          <frameset>                    |
|                |window                                                        |
+----------------+--------------------------------------------------------------+



"onAfterPrint" Properties

+----------------+--------------------------------------------------------------+
| Properties     |altKey                          altLeft                       |
|                |button                          cancelBubble                  |
|                |clientX                         clientY                       |
|                |ctrlKey                         ctrlLeft                      |
|                |offsetX                         offsetY                       |
|                |returnValue                     screenX                       |
|                |screenY                         shiftKey                      |
|                |shiftLeft                       srcElement                    |
|                |type                            x                             |
|                |y                                                             |
+----------------+--------------------------------------------------------------+



"onAfterPrint" Syntax and Note

Note:
    
This event fires when the document prints or print previews.