大家好,我遇到的问题是这样的:
我们公司给客户做项目,曾经有个一页面打印功能,客户也一直用了很久没问题,现在需要新加一个产品的打印,我模仿原来的那个写就出了问题
页面打印调用的很简单,这里是按钮:
<table width="100%" border=0 cellspacing=1 bordercolor=#cfe3fe bordercolorlight=#008000 bordercolordark=#ffffff bgcolor=#656565>
<tr>
        <td width="100%" height="24" class="TableAttrName" colspan="2" >
        <div align="left">
        <OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></object>
<input name=Button4 onClick=printpr() type=button value=打印当前工单>
<input name=Button5 onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置>
<Input Type=Button   Value="返回"   onclick="javascript:history.back()">
</div>
</td>
</tr>
</table>
这个是调用的js
function printpr(){
window.print();
}
现在怪事出来了,我写的新页面和原来是基本一样的,只是jsp的table不同。但是在打印的时候,原来页面不报错,新的页面报错
res://C:\WINDOWS\system32\shdoclc.dll/preview.dlg
然后无论点时还是否都没用,我在网上搜了搜,都是说是客户端的电脑少了东西,但是为什么原来打印的时候没问题呢?我一直很头疼,等待高手赐教