Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var divContents = $("#dvContainer").html();
  2. var printWindow = window.open('', '', 'height=400,width=800');
  3. printWindow.document.write('<html><head><title>DIV Contents</title>');
  4. printWindow.document.write('</head><body >');
  5. printWindow.document.write(divContents);
  6. printWindow.document.write('</body></html>');
  7. printWindow.document.close();
  8. printWindow.print();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement