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