title: Setting the name attribute dynamically
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2565909/getelementbyclass-setattribute-doesnt-work">getElementByClass().setAttribute doesn&#39;t work</a>  </p>
  </blockquote>
  
  
  
  <p>Why this:</p>
  
  <pre><code>document.getElementsByClassName('cke_source').setAttribute('name', "mymessage") 
  </code></pre>
  
  <p>Is returning:</p>
  
  <pre><code>TypeError: Object #&lt;NodeList&gt; has no method 'setAttribute'
  </code></pre>
  
  <p><code>document.getElementsByClassName('cke_source')</code> is returning the object correctly.</p>
  
  <ul>
  <li>No jQuery please.</li>
  </ul>