Mega Code Archive

 
Categories / JavaScript Tutorial / Window
 

Window print()

The print() method simulates the user clicking the Print button on the browser. It tells the browser to open the print dialog box to print the current page. <html>     <body>     <form>       <input type=BUTTON value="Print" onClick="window.print()">     </form>     </body>     </html>