title: How can I set the value of an input (textbox) using jQuery?
body: <p>I've got this input element:</p>
  
  <pre><code>&lt;input type="text" id="txtbxYear"&gt;
  </code></pre>
  
  <p>...and this jQuery to retrieve the current year:</p>
  
  <pre><code>var now = new Date();
  var year = now.getFullYear();
  </code></pre>
  
  <p>...and have tried all of the following to set the value of the "textbox" to the current year:</p>
  
  <pre><code>$( "#txtbxYear" ).html(year);
  $( "#txtbxYear" ).val(year);
  $( "#txtbxYear" ).text(year);
  
  $( "#txtbxYear" ).html(year.ToString());
  $( "#txtbxYear" ).val(year.ToString());
  $( "#txtbxYear" ).text(year.ToString());
  </code></pre>
  
  <p>...but none of them work. </p>
  
  <p>What will work?</p>