ahmed elbarbary

ahmed elbarbary

  • NA
  • 1.6k
  • 277.9k

How to make function give row that have different value with

Feb 5 2020 1:46 PM
How to give red color for rows on html table that have different values on same row?
 
I work on dynamic table html not static . 
I need when at least one cell from row different from each others
then give red font to full row
if you see below row that have same value on all cell not changed color .
I need function give red color for row that have at least one value different from others on same row
so How to make function do that by jquery or java script do red color for row if it have
at least different cell value .
rows have different values give red rows font
 
result disired as below 
 
 
  1. What I have tried:  
  2.   
  3.   
  4. >  
  5. <html>  
  6. <body>  
  7. <table border="1">  
  8. <col width="500">  
  9. <col width="500">  
  10. <col width="500">  
  11. <col width="500">  
  12. <tr bgcolor="#6699FF" width="100%">  
  13.     <th>Part1th>  
  14.     <th>Part2th>  
  15.     <th>Part3th>  
  16.     <th>Part4th>  
  17. <tr>  
  18.     <td>12td>  
  19.     <td>12td>  
  20.     <td>12td>  
  21.     <td>12td>  
  22. tr>  
  23. <tr>  
  24.     <td>12td>  
  25.     <td>15td>  
  26.     <td>12td>  
  27.     <td>12td>  
  28. tr>  
  29. <tr>  
  30.     <td>17td>  
  31.     <td>15td>  
  32.     <td>13td>  
  33.     <td>12td>  
  34. tr>  
  35. table>  
  36.   
  37. <button id="button">Click Mebutton>  
  38. body>  
  39. html>  
 

Answers (1)