有没有activex组件能实现网页"无需人工确认"的打印?急!急!急!

yellowzhong 2003-05-14 08:55:07
如果搞个打印的按钮,会弹出个窗口,需要人工确认
我想实现无需人工确认,是不是用activex完成呢?
...全文
44 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
gq 2003-05-28
  • 打赏
  • 举报
回复
<head>
<title>打印确认</title>
<style media="print">
.noprint { display: none }
</style>
</head>
<body>
<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.paperSize = "A3"
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;
factory.printing.leftMargin = 0.75
factory.printing.topMargin = 1.5
factory.printing.rightMargin = 0.75
factory.printing.bottomMargin = 1.5
}
</script>
<div class=noprint>
<input id="idPrint1" type="button" value="打印本页"
onclick="factory.printing.Print(false)">
<input id="idPrint2" type="button" value="页面设置"
onclick="factory.printing.PageSetup()">
<input id="idPrint3" type="button" value="打印预览"
onclick="factory.printing.Preview()">
<input id="idPrint4" type="button"
onclick="window.close()" value="关闭窗口">
</div>
<br/>
<table width="720" border="0" cellspacing="0" cellpadding="0" align="center" >
<tr>
<td bgcolor="#0099ff">
这里是你要打印的内容,上面的按钮不会被打印出来<br/>
factory.printing.paperSize = "A3"
</td>
</tr></table></body>
yellowzhong 2003-05-14
  • 打赏
  • 举报
回复
小虎,孟子e章的方法好象都要人工干预,有其他的方法吗?
leanray 2003-05-14
  • 打赏
  • 举报
回复
支持!顶!不错
qieyj 2003-05-14
  • 打赏
  • 举报
回复
http://qieyj.myrice.com
tigerwen01 2003-05-14
  • 打赏
  • 举报
回复
在<head></head>之间加入如下代码;
<OBJECT Classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WB width=0></OBJECT>
<script language=javascript>
function doPrintSetup(){
WB.ExecWB(8,1)
}
function doPrintPreview(){
WB.ExecWB(7,1)
}
function doPrint(){
WB.ExecWB(6,1)
}
</script>

在<body>中调用:
<input type=button name=button1 value="直接打印" onclick="return doPrint()">
<input type=button name=button2 value="打印设置" onclick="return doPrintSetup()">
<input type=button name=button3 value="打印预览" onclick="return doPrintPreview()">
<input type=button name=button4 value="打印本页" onclick="javascript:print()">
孟子E章 2003-05-14
  • 打赏
  • 举报
回复
http://lucky.myrice.com/print.htm

28,390

社区成员

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

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