How to print the page in Javascript

To print the page in Javascript you can use the following snippet.

Sample Javascript

<input type="button" value="Print Page" onclick="window.print()" />

Please Share us:
Please rate this snippet

2 thoughts on “How to print the page in Javascript

Leave a Reply