title: Can you use a wildcard in getElementById?
body: <p>I have the following line of code:</p>
  
  <pre><code>document.getElementById("question_*").setAttribute("disabled", "false");
  </code></pre>
  
  <p>I want to use a form of wildcard for the element ID. The script is run and used by lots of different buttons, they all have ID's of question_<code>something</code> - is it possible to make this <code>setAttribute</code> to make the button enabled for various ID's?</p>
  
  <pre><code>&lt;button id="question_1a" onClick="nextQuestion(this.id)" disabled&gt;Next question&lt;/button&gt;
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I've switched to a classname as suggested. Buttons now are:</p>
  
  <pre><code>&lt;button id="question_1a" class="nextButton" disabled&gt;Next question&lt;/button&gt;
  </code></pre>
  
  <p>I've added the following line to make this not disabled:</p>
  
  <pre><code>var elems = document.getElementsByClassName('nextButton').setAttribute("disabled", "false");
  </code></pre>
  
  <p>But I get: <em>Uncaught TypeError: Object # has no method 'setAttribute'</em> </p>