title: How do I change the text value of an <input> tag sung javascript
body: <p>I can't seem to figure out this simple task. I have an input text field which I want to accept a value from and also change the value of when a link is clicked. My HTML code is below:</p>
  
  <pre><code>&lt;body&gt;
      &lt;div id="outsideContainer"&gt;
      &lt;div id="guessContainer"&gt;
          &lt;h3&gt; Guess a number between 1 and 10 &lt;/h3&gt;
  
          &lt;input id="txtfield" name="txtfield" type="text" class="value"/&gt;&lt;br&gt;
  
          &lt;a href=" " class="query"&gt; Submit here &lt;/a&gt; 
      &lt;/div&gt;
      &lt;div id="guessShow"&gt;
          &lt;p class="hotter hideStuff" &gt; Getting Hotter!! &lt;/p&gt;
          &lt;p class="colder hideStuff"&gt; Getting Colder, BRRR!!! &lt;/p&gt;
          &lt;p class="gotIt hideStuff"&gt; Awesome! You have guessed the number &lt;/p&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/body&gt;
  </code></pre>
  
  <p>What I want to do is change the text displayed in that  tag with class = "value" to something. I've tried using </p>
  
  <pre><code>jQuery(document).ready(function(){
           $('.query').on('click', function(){
              $(this).closest('#guessContainer').find('.value').css("value", "whoa");
              });
              });
  </code></pre>
  
  <p>but it is not working. I also tried to use the .css method and assign a value to the input but that didn't work either. Any help would be appreciated.</p>