Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var divContents = $("#dvContainer").html();
- var printWindow = window.open('', '', 'height=400,width=800');
- printWindow.document.write('<html><head><title>DIV Contents</title>');
- printWindow.document.write('</head><body >');
- printWindow.document.write(divContents);
- printWindow.document.write('</body></html>');
- printWindow.document.close();
- printWindow.print();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement