Answers for "bootstrap not working in print"

0

bootstrap not working in print

<script> 
    function printDiv() { 
        var divContents = document.getElementById("main_div").innerHTML; 
        var a = window.open('', '', 'height=500, width=500'); 
        a.document.write('<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"><html>'); 
        a.document.write('<body >'); 
        a.document.write(divContents); 
        a.document.write('</body></html>'); 
        a.document.close(); 
        a.print(); 
    } 
</script>
Posted by: Guest on March-12-2021

Code answers related to "bootstrap not working in print"

Code answers related to "Javascript"

Browse Popular Code Answers by Language