Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

window.print() specific div

function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents;

     window.print();

     document.body.innerHTML = originalContents;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #specific #div
ADD COMMENT
Topic
Name
6+7 =