lodop怎么实现循环打印页面? 现在我有一个页面,我想在js中实现循环打印出这个页面,最少打印两次,求问怎么能实现 JavaScriptlodop 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这是我写的代码,带分页的,这个gridview或者表格外边必须套一个div然后按照注释给参数就行,给力吧!var LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));function prn1_preview(Title, Lists, div2, biaoti,PageNumber) {//Lists 是gridview,Title是查询条件表的id,div2是gridvi外边套的div,biaot是报表的标题 LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); var PrintActionCode = ""; var tableStyleCode = "<style>table{border-collapse:collapse;border:solid 1px blue;}"; tableStyleCode += "table tr td{border:solid 1px blue;white-space:nowrap;word-break:normal;}"; tableStyleCode += "table tr th{border:solid 1px blue;white-space:nowrap;word-break:normal;} </style>"; LODOP.ADD_PRINT_TABLE(40, 210, 700, 1100, tableStyleCode + "<table width='100%' style=\"white-space:nowrap;word-break:normal; font-size='15';height:13%;\">" + $("#" + Title + "").children().html() + "</table>"); var j = 1; LODOP.ADD_PRINT_TEXT(11, "40%", 417, 67, ""+biaoti+"");// LODOP.ADD_PRINT_TEXT(100, 500, 417, 67, "第" + j + "页") LODOP.SET_PRINT_STYLEA(0, "FontSize", 20); PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"95%\", \"90%\", 100, 100, \"<table><tr><td>第" + j + "页</td></tr></table>\");"; PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"25%\", 40, 1050, 1200, \"" + tableStyleCode + "\"+\"<table width='100%'>\" +$(\"#" + Lists + " tr:eq(0)\").html() + pageAction(\"" + div2 + "\",0,20) + \"</table>\");"; for (var i = 20 ; i < $("#" + Lists + " tr").length; i += 25) { PrintActionCode += "LODOP.NEWPAGE();"; j++; PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"95%\", \"90%\", 100, 100, \"<table><tr><td >第" + j + "页</td></tr></table>\");"; PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"10%\", 40, 1050, 1200, \"" + tableStyleCode + "\"+\"<table width='100%'>\" + $(\"#" + Lists + " tr:eq(0)\").html()+ pageAction(\"" + div2 + "\"," + i + "," + (i + 25 ) + ") + \"</table>\");"; } PrintActionCode += "LODOP.PREVIEW();"; eval(PrintActionCode); };function pageAction(div2, begin, end) {//封装的方法,js分页用,div2是gridview外边div的id LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); var html = ""; $("#" + div2 + " tr:lt(" + end + "):gt(" + begin + ")").each(function(i) { html += "<tr>" + $(this).html() + "</tr>"; }); return html;} 用jquery如何实现点击一栏目实现栏目变色,再点击另一栏目也变色,但原来的变回原色 js中修改某标签的内容怎么改? 求更改一段图片移动代码 html开源网游《神魔对决3-千年的未来》c:53,发布会 ExtJS 格式化日期 怎么让视频不挡住图片 Extjs中取父节点下所有子节点的数据 js统计问题 如何在弹出窗体中 去掉地址栏,标准按钮等? 求源码!在一个form中选择一段文字点击按钮可以改变选中文字的大小,急用 提交页面之后,谷歌和火狐浏览器就一直提示在处理; ie浏览器却可以提交? 新手求教下拉菜单
LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
var PrintActionCode = "";
var tableStyleCode = "<style>table{border-collapse:collapse;border:solid 1px blue;}";
tableStyleCode += "table tr td{border:solid 1px blue;white-space:nowrap;word-break:normal;}";
tableStyleCode += "table tr th{border:solid 1px blue;white-space:nowrap;word-break:normal;} </style>"; LODOP.ADD_PRINT_TABLE(40, 210, 700, 1100, tableStyleCode + "<table width='100%' style=\"white-space:nowrap;word-break:normal; font-size='15';height:13%;\">" + $("#" + Title + "").children().html() + "</table>");
var j = 1;
LODOP.ADD_PRINT_TEXT(11, "40%", 417, 67, ""+biaoti+"");
// LODOP.ADD_PRINT_TEXT(100, 500, 417, 67, "第" + j + "页")
LODOP.SET_PRINT_STYLEA(0, "FontSize", 20);
PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"95%\", \"90%\", 100, 100, \"<table><tr><td>第" + j + "页</td></tr></table>\");";
PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"25%\", 40, 1050, 1200, \"" + tableStyleCode + "\"+\"<table width='100%'>\" +$(\"#" + Lists + " tr:eq(0)\").html() + pageAction(\"" + div2 + "\",0,20) + \"</table>\");";
for (var i = 20 ; i < $("#" + Lists + " tr").length; i += 25) {
PrintActionCode += "LODOP.NEWPAGE();";
j++;
PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"95%\", \"90%\", 100, 100, \"<table><tr><td >第" + j + "页</td></tr></table>\");";
PrintActionCode += "LODOP.ADD_PRINT_TABLE(\"10%\", 40, 1050, 1200, \"" + tableStyleCode + "\"+\"<table width='100%'>\" + $(\"#" + Lists + " tr:eq(0)\").html()+ pageAction(\"" + div2 + "\"," + i + "," + (i + 25 ) + ") + \"</table>\");";
} PrintActionCode += "LODOP.PREVIEW();";
eval(PrintActionCode);
};function pageAction(div2, begin, end) {//封装的方法,js分页用,div2是gridview外边div的id
LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
var html = ""; $("#" + div2 + " tr:lt(" + end + "):gt(" + begin + ")").each(function(i) { html += "<tr>" + $(this).html() + "</tr>"; }); return html;
}