Summary  Summary

Add to your favorites

Maps  Maps
Portal  Portal
Geomatic  Geomatic
Computers  Computers
Download  Download
Jobs  Jobs

Customize  Customize
Games  Games
Forums  Forums
GuestBook  GuestBook

CW GIS  CW GIS
GeoRezo  GeoRezo
Georama  Georama




18.227.228.95
Web design
Daniel FAIVRE©
|

JavaScript "Print"

  Français Français 
Introduction
The JavaScript "Print"
 Introduction    
To print a page is quite easy with JavaScript. You can freely copy the source code above to add this function to your web-pages.
 The JavaScript "Print"

   Here's the source code to insert in the <BODY> section of your page to print it with JavaScript:

<SCRIPT LANGUAGE="JavaScript">
function PrintMyPage()
   {
   if (window.print)
     {
     window.print();
     }
   }
</SCRIPT>

   Now, just insert a call to the PrintMyPage() function, like this:

<A HREF="JavaScript:PrintMyPage();">Print</A>

   Another way is to insert the JavaScript code directly in hyperlink instead of the url, like on this page with the "Print" command upper left.