180
rated 0 times
[
183]
[
3]
/ answers: 1 / hits: 19891
/ 13 Years ago, mon, october 17, 2011, 12:00:00
My print html is below
<div id=DivIdToPrint style=border:1px solid #000000;>
fdghgjhghjkjk
<div id=in>TO be are not to be that is the question</div>
</div>
and javascript code is :
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);
}
I want to print DivIdToPrint div but don't show in div content.
More From » html