title: How to update an input text from javascript?
body: <p>I have this simple code that speaks for itself.Here it is:</p>
  
  <pre><code>&lt;script language='javascript"&gt; 
      function check() {} 
  &lt;/script&gt; 
  &lt;div id="a"&gt;input type="text" name="b"&gt; 
  &lt;input type="button" onClick=" check(); "&gt;
  </code></pre>
  
  <p>All i want is that when i press the button, the text field gets a value updated to it.</p>
  
  <p>I tried using b.value=" C " but it doesnt seem to work.</p>