导读:IE内置的WebBrowser控件实现客户订单的打印功能,该控件的具体参数如下:document.all.WebBrowser.Execwb(7,1);//表示打印预览document.all...
IE内置的WebBrowser控件实现客户订单的打印功能,该控件的具体参数如下:
document.all.WebBrowser.Execwb(7,1);//表示打印预览
document.all.WebBrowser.Execwb(6,1);//表示打印
document.all.WebBrowser.Execwb(6,6);//表示直接打印
document.all.WebBrowser.Execwb(8,1);//表示页面设置
document.all.WebBrowser.Execwb(1,1);//打开页面
document.all.WebBrowser.Execwb(2,1);//关闭所有打开的IE窗口
document.all.WebBrowser.Execwb(4,1);//保存网页
document.all.WebBrowser.Execwb(17,1);//全选
document.all.WebBrowser.Execwb(22,1);//刷新
document.all.WebBrowser.Execwb(45,1);//关闭窗体提示
document.all.WebBrowser.Execwb(10,1);//查看页面属性
在实现 打印功能时,首页需要建立html的object标签,调用WebBrowser控件,代码如下:
复制代码代码如下:
- <object ID='WebBrowser1' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>