Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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> 
Comment

PREVIOUS NEXT
Code Example
Javascript :: get array of selected options from select element 
Javascript :: how to remove sub array null index in javascript 
Javascript :: remove first and last element from array javascript and seprated by comma 
Javascript :: set value lookup javascript dynamics 365 
Javascript :: convert jquery to string 
Javascript :: js catch rejected promise 
Javascript :: append after div 
Javascript :: summation js 
Javascript :: innertext of input js 
Javascript :: javascript form validation 
Javascript :: media query in jsx 
Javascript :: How to Submit Forms and Save Data with React.js 
Javascript :: classlist 
Javascript :: check if object is not defined js 
Javascript :: parse data from url javascript 
Javascript :: js months ago 
Javascript :: if browsertab is active jquery 
Javascript :: javascript random 1 or 0 
Javascript :: javascript to array 
Javascript :: images not displaying in react 
Javascript :: JavaScript querySelector - By ID 
Javascript :: for javascript 
Javascript :: declare function javascript 
Javascript :: react youtube npm 
Javascript :: javascript allow default 
Javascript :: cypress json schema vs code 
Javascript :: javascript return string 
Javascript :: jquery cdn by google 
Javascript :: js get index from foreach 
Javascript :: capitalize mdn 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =