日期:2014-05-18  浏览次数:20576 次

jsp 实现客户端打印 请大侠给点思路阿!!!!
如题,如何在客户端中打印浏览器中的内容,要从数据库中动态取出数据,
现在我用netBeansvwp,有没有相关的组件呢,请大家帮助!!

------解决方案--------------------
用jasperreports
------解决方案--------------------
用JavaScript的打印按钮,代码如下:打印
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印> <OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0> </OBJECT>

------解决方案--------------------

text: "打印 ",
function(){
document.getElementById( 'WebBrowser ').ExecWB(6,6);
}


new Ext.Button( "div_Button2 ", {
text: "页面设置 ",
function(){
document.getElementById( 'WebBrowser ').ExecWB(8,1);
}

text: "打印预览 ",
function(){
document.getElementById( 'WebBrowser ').ExecWB(7,1);

}