How to color table rows on the basis of column 'value' or 'text' in javascript?
<p>I am having column name as 'Status'. If status is 'Pass' i need to show that row  in green color. If 'fail' then red. How to do it in javascript? </p>

<pre><code>for (i=0; i &lt; rows.length; i++) {
    var value = rows[i].getElementsByTagName("td")[0].firstChild.nodeValue;
    if (value == 'Pass') {
        rows[i].style.backgroundColor = "red";
    }
}
</code></pre>

<p>I tried this but it is not supported by browser. Kindly help. Thanks.</p>
