<head>
<script language="JavaScript">
<!--
function doPrint() {
bdhtml = window.document.body.innerHTML;
sprnstr = "<!--startprint-->";
eprnstr = "<!--endprint-->";
prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
window.document.body.innerHTML = prnhtml;
window.print();
location.reload();
}
//-->
</script>
</head>
<body>
<!--startprint-->
<table width="700" align="left" border="1">
<tr>
<td>待打印的内容</td>
</tr>
</table>
<!--endprint-->
<input type="button" onclick="doPrint()">
</body>