title: JS - disable all inputs with className == "A"
body: <p>On a web site I want to disable (lock) all inputs with className == "A". The inputs have multiple <code>classNames</code> like <code>"A B C"</code>:</p>
  
  <p>This is the HTML   </p>
  
  <pre><code>&lt;input type="text" class="A B C" value="anything"/&gt;
  </code></pre>
  
  <p>This is my JavaScript :     </p>
  
  <pre><code>var el = document.getElementsByTagName("INPUT") 
  
  for (var i = 0; i &lt; el.length; i++) {
        if (el[i].className == 'A')   
            el[i].disabled = true
  }
  </code></pre>
  
  <p>But this does not work because <code>el.className</code> is always <code>"A B C"</code>. I know that I can use string methods to find <code>A</code>.    </p>
  
  <p>Are there more clever, faster ways ?</p>
  
  <p>Info :<br>
  I need to use <code>document.getElementsByTagName("INPUT")</code> and I use pure JavaScript !</p>