Created
December 12, 2019 14:08
-
-
Save ordotools/d522f60a13b17c488fd5c69fd21cccc5 to your computer and use it in GitHub Desktop.
[Print a <div> in Javascript] #javascript #print
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printdiv() { | |
var a = window.open('', ''. 'width = 600, height = 800'); | |
a.document.open('text/html'); | |
a.document.write(document.getElementById('print_me').innerHTML); | |
a.document.close(); | |
a.print(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment