title: text of input field is not printing while print using window.print()
body: <p>I have following html layout:</p>
  
  <pre><code>Please fill up this form carefully:
  &lt;input type="button" onclick="printDiv('print'); return false;" value="Print" /&gt;
  &lt;div id="print"&gt;
    &lt;form action="" method="post"&gt;
       &lt;input type="text" name="user_name" value="" /&gt;
       &lt;input type="text" name="address" value="" /&gt;
       &lt;input type="text" name="date" value="14-06-2015" /&gt;
       &lt;input type="submit" value="SUBMIT" /&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the printDiv('print') function in the head section of that html page:</p>
  
  <pre><code>function printDiv(divName) {
    var printContents = document.getElementById(divName).innerHTML;
    var originalContents = document.body.innerHTML;
    document.body.innerHTML = printContents;
    window.print();
    document.body.innerHTML = originalContents;
  }
  </code></pre>
  
  <p>but while printing the form after filled-up, it is not showing the text of input fields that an user entered in the input box. but the predefined text (here the date field) of the input field of the same form is printing as usual.</p>
  
  <p>How can I rewrite the javascript function so that it will print the text of input fields aslo?</p>