Javascript yazdır fonksiyonu. Bir div içindeki bölümü yazıcıdan yazdırma komutu verir.
printElem(divId,tarh) {
var content = document.getElementById(divId).innerHTML;
var mywindow = window.open('_self', 'tarh', 'height=600,width=800');
mywindow.document.write('<html><head><title>Print</title>');
mywindow.document.write('</head><body >');
mywindow.document.write(content);
mywindow.document.write('</body></html>');
mywindow.document.close();
mywindow.focus() mywindow.print();
mywindow.close();
return true;
}
printElem('yazdr','2021-08-11')