function doPrint(obj) { obj.parentNode.parentNode.removeChild(obj.parentNode); bdhtml=window.document.body.innerHTML; sprnstr=""; eprnstr=""; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); }
js页面打印,js订单打印,js快递单打印,js面单打印
html页面
打印预览
把要打印的内容html用
< !- - startprint- - >
< ! - - endprint - - >
标记