您现在的位置是:首页 > 电脑技术查询 > web开发

firefox下如何实现 如下的打印效果

编辑:chaxungu时间:2022-10-02 23:18:50分类:web开发

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 ")