日期:2014-05-16  浏览次数:20364 次

firefox下怎么实现 如下的打印效果?
<OBJECT   id=WebBrowser   height=0   width=0   classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2> </OBJECT>
<INPUT   onclick=document.all.WebBrowser.ExecWB(1,1)   type=button   value=打开   name=Button1>  
<INPUT   onclick=document.all.WebBrowser.ExecWB(4,1)   type=button   value=另存为   name=Button2>  
<INPUT   onclick=document.all.WebBrowser.ExecWB(10,1)   type=button   value=属性   name=Button3>  
<INPUT   onclick=document.all.WebBrowser.ExecWB(6,1)   type=button   value=打印   name=Button>  
<INPUT   onclick=document.all.WebBrowser.ExecWB(8,1)   type=button   value=页面设置   name=Button4>  


以上是ie下打印效果,但是在firefox下不支持,上网搜索又没有找到相应的firefox打印代码。

请各位指点指点!谢谢!

------解决方案--------------------
firefox下不支持document.all写法,
你换成document.getElementById( "WebBrowser ")
------解决方案--------------------
document.getElementById( "WebBrowser ")