通过使用 printThis这个效果最好。jqprint、printArea对表格兼容不是很友好。均可自动分页,插件请官网自行下载
function autoDoPrint() {
//$("#detailPage").jqprint(
//// {
//// debug: false,
//// importCSS: true,
//// printContainer: true,
//// operaSupport: false
////}
//);
$("#detailForm").printArea();
//$("#detailForm").printThis({
// debug: false,
// importCSS: true,
// importStyle: true,
// printContainer: true,
// // loadCSS: "/Content/Themes/Default/style.css",
// pageTitle: "二维码",
// removeInline: false,
// printDelay: 333,
// header: null,
// formValues: false
//});
// alert("等待打印");
}