<head> <script language="JavaScript"> function function1() { window.print(); } </script> </head> <body onafterprint="alert('complete')"> <p>Some body Content to print.</p> <form> <input type="button" value="Print" onclick="function1()"> </form> </body>