title: How to get element by both id and class
body: <p>Is there any alternative solution (in JavaScript) for <code>document.getElementById();</code> to select a specific element, specifying both the class and id ?</p>
  
  <p>for example I have such a content:</p>
  
  <pre><code>&lt;a class="q_href" onclick="showQuestion(1)"&gt;Question 1:&lt;/a&gt;
  &lt;div class="q_content" id="1"&gt;&lt;/div&gt;
  
  &lt;a class="q_href" onclick="showQuestion(2)"&gt;Question 2:&lt;/a&gt;
  &lt;div class="q_content" id="2"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And I want to select the corresponding div under the "Question X" link in the function</p>
  
  <pre><code>function showQuestion(id)
  {
  var thediv = GetByClassAndId("q_content",id); // how to implement this function ?
  WriteQuestionIn(thediv); //Ajax
  }
  </code></pre>
  
  <p>Thanks in advance.</p>