I got the help of Stackoverflow
to mount a script to print a document, now I have a second problem, the script opens the print page without formatting css
.
I saw an example here but I could not change it according to what I need, I saw it here:
In the example the css is being loaded by the script, but in my example I have this:
document.getElementById('btn').onclick = function() { var conteudo = document.getElementById('conteudo').innerHTML, impressao = window.open('about:blank'); impressao.document.write(conteudo); impressao.window.print(); impressao.window.close(); };
How can I load css in my example?