title: Change value attribute by class via JavaScript
body: <p>I have the following HTML:</p>
  
  <pre><code>&lt;input class="vertical-tabs-active-tab" type="hidden" value="account" name="tabs__active_tab"&gt;
  </code></pre>
  
  <p>I need JavaScript that will change the value of "account" to "yolo".</p>
  
  <p>I thought I could do this:</p>
  
  <pre><code>document.getElementsByClassName('vertical-tabs-active-tab').setAttribute("value", "yolo");
  </code></pre>
  
  <p>But that produces an error of: </p>
  
  <pre><code>document.getElementsByClassName(...).setAttribute is not a function
  </code></pre>
  
  <p>I'm not able to add an "id" to input, I have to change the value based on class.</p>