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