如何在网页中实现对我自动生成的DM单进行打印!!!高分寻求!!!

sbinth 2006-06-11 08:19:17
我在网站中写了一个自动生成DM单的程序,我现在想要通过带预览的方式来打印我生成的DM单,但现在我只知道打印整个网页的方法.请问各位高手,我怎么才能只打印我的DM单,而不打印其他不需要的东西!!!可开新贴给分!!200分
...全文
166 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
www_7di_net 2007-03-20
  • 打赏
  • 举报
回复
http://hi.baidu.com/see7di/blog/item/7dca1a238bd3594f93580742.html
wawowawoo 2006-06-11
  • 打赏
  • 举报
回复
邦顶!
kaijier 2006-06-11
  • 打赏
  • 举报
回复
wolfhero 2006-06-11
  • 打赏
  • 举报
回复
看看吧,希望对你有用


<OBJECT style="DISPLAY: none" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=0 ></OBJECT>
<script language="javascript">
function printsetup(){
// 打印页面设置
wb.execwb(8,1);

}
function printpreview(){
src="pagesetup_null()"
// 打印页面预览
wb.execwb(7,1);
}
function printit()
{
if (confirm('确定打印吗?')) {
wb.execwb(6,1)
}
}
function window.onbeforeprint() {
document.all.button_print.style.display = "none"; //按钮不打印
document.all.button_setup.style.display = "none";
document.all.button_fh.style.display = "none";
document.all.button_yl.style.display = "none";
}
function window.onafterprint() {
document.all.button_print.style.display = "inline";
document.all.button_setup.style.display = "inline";
document.all.button_fh.style.display = "inline";
document.all.button_yl.style.display = "inline";
}



<form method="post" action="" name="inputform">
<table align="center" width="750">

<tr align="center"><td>你想打印的内容</td></tr>

<tr align="center"><td>
<p></p><div align=center>
<input type=button name=button_print value=" 打 印 " onclick="javascript:printit()" >
<input type=button name=button_setup value="打印页面设置" onclick="javascript:printsetup()"
<input type=button name=button_yl value="打印预览" onclick="printpreview()">
<INPUT type="button" name=button_fh value=" 返 回 " onclick="javascript:history.back(-1)"></div>
</td></tr>
</table>
</form>
邦迪代驾 2006-06-11
  • 打赏
  • 举报
回复
关注

28,404

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧