title: How to get input text field values in print preview?
body: <p>Here is a sample code what I am trying to fix. In print screen I am not able to see the text which is entered in <code>input</code> text field. Any solution will be appreciated.</p>
  
  <pre><code> var divToPrint=document.getElementById('div1Id');
  
   if (divToPrint != null &amp;&amp; divToPrint != "") {
     var newWin=window.open('','Print-Window');
     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();
     newWin.close();    
   }
  </code></pre>