Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

printing in javascript

function printpage(){
    var originalContents = document.body.innerHTML;
    var printReport= document.getElementById('div1').innerHTML;
    document.body.innerHTML = printReport;
    window.print();
    document.body.innerHTML = originalContents;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #printing #javascript
ADD COMMENT
Topic
Name
2+8 =