title: Set value and text of select option from javascript
body: <p>How can I sett the value and text of a select option from javascript?</p>
  
  <pre><code>function getYear() 
  {
      var d = new Date();
      var year = d.getFullYear();
      return year;
  }
  
  
  &lt;select name="dateformat" onchange="change_date();" id="dateformat"&gt;
     &lt;option value="??" &gt;??&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I want the value of getYear() in place of ??.</p>