Developer Blog

Printing a webpage

Webpage can be printed using window.print(). Here is the code:

<a onclick="window.print(); return false" href="http://ash-mvc.org/blog/webpage.html">Print This Page</a>

“return false” cancels the link to “webpage.html”.

When the hyperlink “Print This Page” is clicked, the page is printed if the printer is already installed.

One Response to “Printing a webpage”

  1. sakti Says:

    Thanks, it is very helpful.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image



Get Download Files Review Project Dashboard Know Plan And Wishlist