Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.