Mon impression html est inférieurimprimer le contenu div javascript
<div id="DivIdToPrint" style="border:1px solid #000000;">
fdghgjhghjkjk
<div id="in">TO be are not to be that is the question</div>
</div>
et code javascript est:
function printDiv()
{
var divToPrint=document.getElementById('DivIdToPrint');
var newWin=window.open('','Print-Window','width=400,height=400,top=100,left=100');
newWin.document.open();
newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
newWin.document.close();
setTimeout(function(){newWin.close();},10);
}
Je veux imprimer "DivIdToPrint" div mais ne montrent pas "dans" le contenu div .
Je suis heureux que cela a fonctionné pour vous. Merci. –