如表格打印时最后一列不打印
<button class="btn btn-info print-btn" οnclick="prn1_preview()" >打印</button>
<script language="javascript" type="text/javascript">
var LODOP; //声明为全局变量
function prn1_preview() {
$("#printArea tr:first").find("th:last").remove();
$("#printArea tr:last").find("th:last").remove();
$("#printArea tr").each(function(i,n){
// $(this).find("th:last").remove();
$(this).find("td:last").remove();
})
CreateOneFormPage();
LODOP.PREVIEW();
};
function CreateOneFormPage(){
LODOP=getLodop();
LODOP.PRINT_INIT("打印演示1");
LODOP.SET_PRINT_STYLE("FontSize",16);
LODOP.SET_PRINT_STYLE("Bold",20);
LODOP.ADD_PRINT_TEXT(50,231,260,39,document.getElementById("koufei").innerHTML);
var strBodyStyle="<style>table,td,th { border: 1 solid #000000;border-collapse:collapse } table{width:100%} td,th{height:30px;line-height:30px;padding:0 10px;text-align:left;} th.text-center{text-align:center;} a{text-decoration:none;color:#333;} </style>";
var strFormHtml=strBodyStyle+"<body>"+document.getElementById("printArea").innerHTML+"</body>";
LODOP.ADD_PRINT_HTM(88,0,"100%","100%",strFormHtml);
};
</script>