mirror of
https://github.com/openclassify/openclassify.git
synced 2026-04-23 15:27:40 -05:00
13 lines
341 B
JavaScript
13 lines
341 B
JavaScript
function printElement(elementID){
|
|
var divContents = document.getElementById(elementID).innerHTML;
|
|
var printWindow = window.open('', '', 'height=550, width=800');
|
|
|
|
printWindow.document.write(divContents);
|
|
|
|
printWindow.document.close();
|
|
|
|
setTimeout(() => {
|
|
printWindow.print();
|
|
},500)
|
|
printWindow.focus();
|
|
} |