--endprint"+oper+"-->";//设置打印结束区域 prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html...prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html window.document.body.innerHTML...=prnhtml; window.print(); window.document.body.innerHTML=bdhtml; } else { window.print(); } } </script
--endprint-->"; //结束打印标识字符串 prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17); //从开始打印标识之后的内容...prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //截取开始标识和结束标识之间的内容 window.document.body.innerHTML... = prnhtml; //把需要打印的指定内容赋给body.innerHTML window.print(); //调用浏览器的打印功能打印指定区域 location.reload(); //重新给页面内容赋值
–endprint”+oper+”–>”;/ /设置打印结束区域 prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); / /从开始代码向后取html...prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));/ /从结束代码向前取html window.document.body.innerHTML...=prnhtml; window.print(); window.document.body.innerHTML=bdhtml; } else { window.print(); } }...–endprint” + oper + “–>”;//设置打印结束区域 prnhtml =bdhtml.substring(bdhtml.indexOf(sprnstr)...+ 18); //从开始代码向后取html prnhtml = prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取
--endprint"+fang+"-->";//设置打印结束区域 prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html...prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html window.document.body.innerHTML=...prnhtml; window.print(); window.document.body.innerHTML=bdhtml; } else { window.print(); } } </script
--endprint"+oper+"-->";//设置打印结束区域 prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取...html prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html window.document.body.innerHTML...=prnhtml; window.print(); window.document.body.innerHTML=bdhtml; } else { window.print(
function print(){ var bdhtml = window.document.body.innerHTML; var prnhtml...= $("#toPrint").html(); window.document.body.innerHTML = prnhtml;...body内容,所以这个方法大体来讲,分四个步骤: 1.获取原有body里面的所有内容 var bdhtml = window.document.body.innerHTML 2.获取待打印内容 var prnhtml...= document.getElementById(“toPrint”); 3.将页面body替换为待打印内容并进行打印 window.document.body.innerHTML = prnhtml
--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,...prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } var hkey_root
--endprint-->';"); strExcel.Append("var prnhtml=htmlcode.substr(htmlcode.indexOf(sprnstr)+...17);"); strExcel.Append("prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));"); ...strExcel.Append("window.document.body.innerHTML=prnhtml;"); strExcel.Append("window.print(
领取专属 10元无门槛券
手把手带您无忧上云