📅  最后修改于: 2022-03-11 15:03:02.548000             🧑  作者: Mango
function PrintElem() {
var mywindow = window.open('', 'PRINT');
mywindow.document.write('Payment Slip ');
mywindow.document.write('');
mywindow.document.write(' ');
mywindow.document.write('' +
'' +
'Name: ' + $('.lblName').html() + ' ' +
'Address: ' + $('.lblAddress').html() + ' ' +
'Meter No: ' + $('.lblMeterNo').html() + ' ' +
'Token: ' + $('.lblToken').html() + ' ' +
'
'+
' ' +
''+
'');
mywindow.document.write('');
mywindow.document.close(); // necessary for IE >= 10
mywindow.focus(); // necessary for IE >= 10*/
mywindow.print();
mywindow.close();
return true;
}