title: Change the color of the table row based on the value from sercer
body: <p>I am creating a JSP page with a html table to display employee directory. This is scriptlet :</p>
  
  <pre><code>      &lt;%
              String selectedItem = "";
              List&lt;Employee&gt; list = new ArrayList&lt;Employee&gt;();
  
              PhoneListController controller = new PhoneListController();
               list = controller.getAllContacts();
              }
              for (Employee eachEmp : list) {
  
          %&gt;
  
  
             &lt;tr &gt;
                  &lt;td&gt;&lt;%=eachEmp.getLast()%&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%=eachEmp.getFirst()%&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%=eachEmp.getExt()%&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%=eachEmp.getLoc()%&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%=eachEmp.getCell()%&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%=eachEmp.getTeam1()%&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
  &lt;% } %&gt;
  </code></pre>
  
  <p>and then i display the table rows and columns for each employee object(PS: I know scriptlets are bad and obsolete but this is my first individual project.)</p>
  
  <p>I would like to change the background color of certain rows based on value of one particular value(based on eachEmp.getManagerCode). </p>
  
  <p>How can i achieve that by using javascript? I tried to call a js function by calling onload event on . But as I need to check for each row that is not the possible solution. I have not tried jquery yet as I am very new to jquery and I didnt quite understand how to do it in jquery.</p>
  
  <p>Please help.</p>
  
  <p>Thanks</p>