<form id=”form1″>
<div id=”dvContainer”>(เอาเนื้อหาเว็บมาใส่ในี้)</div>
<input id=”btnPrint” type=”button” value=”พิมพ์หน้านี้” />
</form>
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”></script>
<script type=”text/javascript”>
$(“#btnPrint”).live(“click”, function () {
var divContents = $(“#dvContainer”).html();
var printWindow = window.open(”, ”, ‘height=400,width=800’);
printWindow.document.write(‘<html><head><title>insurancethai.net</title>’);
printWindow.document.write(‘</head><body >’);
printWindow.document.write(divContents);
printWindow.document.write(‘</body></html>’);
printWindow.document.close();
printWindow.print();
});
</script>