replace class value with javascript
<p>I would like to replace <code>abcName</code> with <code>xyzName</code>?</p>

<pre><code>&lt;tr&gt;
    &lt;td&gt;
        &lt;b class="abcName"&gt;Bob&lt;/b&gt;
    &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Using this, but on page load nothing changes:</p>

<pre><code>var bobo = document.getElementsByTagName("td");


function user(a, b, c) {
    try {
        if (bobo[c].innerHTML.match('&gt;' + a)) {
            bobo[c].className = b;
        }
    } catch (e) {}
}


function customs() {
    for (i = 0; i &lt; bobo.length; i++) {

        classChange("Bob", "xyzName", i);

    }
}
setInterval("customs()", 1000);
</code></pre>
