title: HTML/JS: How to change option value of select type using JS
body: <p>I've been trying to figure out how to set a value to a an option in a select type. But no matter how much I try to understand I just can't (feels ashamed)..</p>
  
  <p>So I was hoping that you guys could help me since you've helped me so many times before.. :)</p>
  
  <p>Let's say we have:</p>
  
  <pre><code>&lt;select name="box" id="test"&gt;    
  &lt;option value='tval'&gt;Content&lt;/option&gt;
  </code></pre>
  
  <p>shouldn't this next code change the text from 'Content' to 'box'?</p>
  
  <pre><code>function changeContent(form){
  form.document.getElementById('test').options['tval'].value = 'box';
  }
  </code></pre>
  
  <p>or am I completely wrong here? I've looked up so many different articles but no one could help me understand how to do this..</p>
  
  <p>Thanks guys!</p>