CancelImage Upload

How to create an onClick Print Button with JavaScript

As far as programming in JavaScript goes, there are few simpler commands than the one used to call upon the browser's printer:


This function will call up the print box, where you can then select the default printer, and indeed print the page. Here is a more extensive example, using a link to call upon the function:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.
<a href="javascript:window.print();">Print</a>

Want to leave a comment?

No problem. Just enter your email and password below.

register | home | reminder

myDesignTool Networking •