<html>
<head>
<title>打印</title>
<meta http-equiv="Content-Type" c>
<script language=javascript>
function preview()
{
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();
window.document.body.innerHTML=bdhtml;
}
</script>
</head>
<body>
<input type="button" value="打印">
<!--startprint-->
<table width="98%" border="0" cellpadding="0" cellspacing="2" align="center">
<tr>
<td height="21" align="center"><h1>快递单</h1></td>
</tr> <tr>
<td height="131" align="center"> 这里可以用任何形式的表示方式(比如table,比如div)来限制和调整快递单子上的内容! </td>
</tr>
</table>
<!--endprint-->
</body>
</html>