Monday, December 6, 2021

To print div in javascript

 var divContents = document.getElementById("divColumnsRight").innerHTML;

var a = window.open("", "", 'height = 500, width = 500");

a.document.write("<html>");

a..document.write("<body><h1> div content <br>");

a..document.write(divContents);

a..document.write("</body></html>");

a.document.close();

a.print();

No comments:

Post a Comment