Printer Print using HTML
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;
}
|