change attribute to element by Tag name
<p>I have an alement that I want to put a class to. But the loop keeps giving me</p>

<p><em>getElementsByTagName is not defined</em> </p>

<pre><code>&lt;script&gt;
var textarea = getElementsByTagName("textarea");
for(i = 0; i&lt;textarea.length; i++){
textarea .setAttribute("class" "textbox")
}
&lt;/script&gt;

 &lt;textarea&gt;&lt;/textarea&gt;
 &lt;textarea&gt;&lt;/textarea&gt;
</code></pre>
