Created
September 17, 2019 14:30
-
-
Save clairtonluz/20d4675a308c21f3c882c234ae085ec7 to your computer and use it in GitHub Desktop.
This file contains 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 printById(elementId) { | |
var popup = window.open(); | |
popup.document.write(document.getElementById(elementId).outerHTML); | |
popup.focus(); //required for IE | |
popup.print(); | |
popup.close(); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment