Skip to content

Instantly share code, notes, and snippets.

View Clemens05's full-sized avatar
👨‍💻

Clemens R Clemens05

👨‍💻
View GitHub Profile
@andrewlimaza
andrewlimaza / example.html
Created December 19, 2016 11:31
Print certain div / elements using window.print()
<script>
function printDiv(divName){
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;