How to remove the class in javascript?
<pre><code>&lt;div id="tab1" class="nav left"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/magento/" class="now"&gt;Home&lt;/a&gt;&lt;/li&gt;
......
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>Now, i want to remove the <code>class="now"</code> or set the class value empty. If the url not on mangento, I using the following code. But the I don't know how to write the last part.</p>

<pre><code>window.onload = function removeNow() {
    var div = document.getElementById("tab1").getElementsByTagName("a");
    if (window.location.pathname != '/magento/') {
        div.removeClass();
    }
}
</code></pre>

<p>Thank you.</p>
