JavaScript DHTML/Development/Print

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

Print a page

   <source lang="html4strict">

<html> <head> <script type="text/javascript"> function printpage(){

   window.print()

} </script> </head> <body> <form> <input type="button" value="Print this page" onclick="printpage()"> </form> </body> </html>


      </source>
   
  


Printing Control

   <source lang="html4strict">

/* JavaScript Bible, Fourth Edition by Danny Goodman John Wiley & Sons CopyRight 2001

  • /

<HTML> <HEAD> <TITLE>Print()</TITLE> </HEAD> <BODY> <FORM>

<INPUT TYPE="button" NAME="printWhole" VALUE="Print Entire Frameset" onClick="parent.print()">

<INPUT TYPE="button" NAME="printFrame" VALUE="Print Bottom Frame Only" onClick="parent.display.print()"><P> </FORM> </BODY> </HTML> </source>