JavaScript DHTML/Event onMethod/onBeforePrint

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

"onBeforePrint" Example

   <source lang="html4strict">
   

<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>