关于打印机的设置 有个叫ScriptX的东东,能实现你上面的要求,你去网上下载一个 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object><script defer>function window.onload() { factory.printing.header = "" factory.printing.footer = "" factory.printing.portrait = false idPrint1.disabled = false; // enable UI button idPrint2.disabled = false; idPrint3.disabled = false; idPrint4.disabled = false; idPrint5.disabled = false;// factory.printing.leftMargin = 0.85// factory.printing.topMargin = 0.55// factory.printing.rightMargin = 2.35// factory.printing.bottomMargin = 0.3 this.focus() //factory.printing.PageSetup() }</script><title>大</title></head><body><div class=noprint> <input id="idPrint2" type="button" value="页面设置" onclick="factory.printing.PageSetup()" class=f3> <input id="idPrint3" type="button" value="打印预览" onclick="factory.printing.Preview()" class=f3> <input id="idPrint1" type="button" value="打印" onclick="factory.printing.Print(false)" class=f3> <input id="idPrint4" type="button" onclick="window.close()" value="关闭窗口" class=f3> </div> 我的做法是使用scriptX和WebBrowser合作使用scriptX使用及说明参见http://www.meadroid.com/sx_intro.asp,Basic版免费,下载使用。WebBrowser使用方法如下WebBrowser.ExecWB(1,1) 打开Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口Web.ExecWB(4,1) 保存网页Web.ExecWB(6,1) 打印Web.ExecWB(7,1) 打印预览Web.ExecWB(8,1) 打印页面设置Web.ExecWB(10,1) 查看页面属性Web.ExecWB(15,1) 好像是撤销,有待确认Web.ExecWB(17,1) 全选Web.ExecWB(22,1) 刷新Web.ExecWB(45,1) 关闭窗体无提示 http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnscrpt/html/dhtmlprint.asphttp://www.meadroid.com/scriptx/docs/printdoc.htm?static <style>@media print{INPUT {display:none}}</style><TABLE border="0" style="font-size:9pt;" width="300px" align="center"><THEAD style="display:table-header-group;font-weight:bold"><TR><TD colspan="2" align="center" style="font-weight:bold;border:3px double red">每页都有的表头</TD></TR></THEAD><TBODY style="text-align:center""><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR><TD>表格内容</TD><TD>表格内容</TD></TR><TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR></TBODY><TFOOT style="display:table-footer-group;font-weight:bold"><TR><TD colspan="2" align="center" style="font-weight:bold;border:3px double blue">每页都有的表尾</TD></TR></TFOOT></TABLE><input type=button value=" 打 印 " onclick="window.print()"> 希望可以讲解下关于前端开发性能、缓存的问题 为什么不能改变table的结构 谁知道这个js效果怎么写啊!很常见的,就是我没有代码,也不会自己写 java script随机数问题,很急,在线等!!! javascript 宝典四 光盘 另类javascript数组,怎么获取数组长度? 模拟框覆盖标签的问题? 急:寻求自动化对象MSXML的类结构 有那位高人能很完美的解决在页面强制弹出下裁对话框,无论是否ie能够识别的文件类型的方式??? 通过websocket接收的音频流,如何使用audio标签播放 莫乱发言!有没有Jsp+javascrip+SQL2000实现的树! 关于下拉表单,帮忙看看!
<script defer>
function window.onload() {
factory.printing.header = ""
factory.printing.footer = ""
factory.printing.portrait = false
idPrint1.disabled = false; // enable UI button
idPrint2.disabled = false;
idPrint3.disabled = false;
idPrint4.disabled = false;
idPrint5.disabled = false;
// factory.printing.leftMargin = 0.85
// factory.printing.topMargin = 0.55
// factory.printing.rightMargin = 2.35
// factory.printing.bottomMargin = 0.3
this.focus()
//factory.printing.PageSetup()
}
</script>
<title>大</title>
</head>
<body>
<div class=noprint>
<input id="idPrint2" type="button" value="页面设置" onclick="factory.printing.PageSetup()" class=f3>
<input id="idPrint3" type="button" value="打印预览" onclick="factory.printing.Preview()" class=f3>
<input id="idPrint1" type="button" value="打印" onclick="factory.printing.Print(false)" class=f3>
<input id="idPrint4" type="button" onclick="window.close()" value="关闭窗口" class=f3>
</div>
scriptX使用及说明参见http://www.meadroid.com/sx_intro.asp,Basic版免费,下载使用。
WebBrowser使用方法如下WebBrowser.ExecWB(1,1) 打开Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口Web.ExecWB(4,1) 保存网页Web.ExecWB(6,1) 打印Web.ExecWB(7,1) 打印预览Web.ExecWB(8,1) 打印页面设置Web.ExecWB(10,1) 查看页面属性Web.ExecWB(15,1) 好像是撤销,有待确认Web.ExecWB(17,1) 全选Web.ExecWB(22,1) 刷新Web.ExecWB(45,1) 关闭窗体无提示
@media print{
INPUT {display:none}
}
</style>
<TABLE border="0" style="font-size:9pt;" width="300px" align="center">
<THEAD style="display:table-header-group;font-weight:bold">
<TR><TD colspan="2" align="center" style="font-weight:bold;border:3px double red">每页都有的表头</TD></TR>
</THEAD>
<TBODY style="text-align:center"">
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
</TBODY>
<TFOOT style="display:table-footer-group;font-weight:bold">
<TR>
<TD colspan="2" align="center" style="font-weight:bold;border:3px double blue">每页都有的表尾</TD>
</TR>
</TFOOT>
</TABLE>
<input type=button value=" 打 印 " onclick="window.print()">