Print a Page
<input type="button" name="print" value="PRINT" onclick="window.print();" />
You can just use a buttion which will invoke a function when the button is clicked. The window.print() function opens the printing option window just as the same as you see when you click File->Print in a browser. Just see the sample below. Click on the PRINT button and see the action.