print div contents in javascript
<p>My print html is below</p>

<pre><code>&lt;div id="DivIdToPrint" style="border:1px solid #000000;"&gt;
 fdghgjhghjkjk
&lt;div id="in"&gt;TO be are not to be that is the question&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>and javascript code is :</p>

<pre><code>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('&lt;html&gt;&lt;body   onload="window.print()"&gt;'+divToPrint.innerHTML+'&lt;/body&gt;&lt;/html&gt;');
newWin.document.close();
setTimeout(function(){newWin.close();},10);

}
</code></pre>

<p>I want to print  "DivIdToPrint" div but don't show "in " div content.  </p>
