title: How to set alternate row background color using javascript
body: <p>I am new to ASP.Net. I want to set the HTML table alternate row background color using javascript.
  How can I start with it.If I do like this,</p>
  
  <pre><code>&lt;tr  id="230552" onClick="HighLightTR(230552);"&gt;&lt;td&gt;My Text Here&lt;/td&gt;&lt;/tr&gt;  
  
  
     function HighLightTR (grpid) {  
     document.getElementById(grpid).style.background = '#3875D7';         
  }  
  </code></pre>
  
  <p>it will apply only for that perticuler row. I want to apply two colors for alternate rows.</p>