<script type="text/javascript">
function doPrint() {
var newWin =
window.open(‘about:blank‘,‘‘,‘‘);
var titleHTML =
document.getElementById("doctitle").innerHTML;
newWin.document.write(titleHTML);
newWin.document.location.reload();
newWin.print();
newWin.close();
}
</script>
<div
id="doctitle">
<table width="100%" border="0" .....
</div>
<input id="Button1" onclick="doPrint()" type="button"
value="打印test" />