Sharma Raushan

Sharma Raushan

  • NA
  • 527
  • 15.1k

change background color of Row

Nov 4 2020 8:14 AM
I have below table , on button click i want to change the background color of rows where OrderType is 'Special'.
  1. <table id="tblOrder">  
  2.     <tr>  
  3.         <th>Id</th>  
  4.         <th>Name</th>  
  5.         <th>Order Type</th>  
  6.     </tr>  
  7.     <tr>  
  8.         <td>1</td>  
  9.         <td>Gupta Traders</td>  
  10.         <td>Special</td>  
  11.     </tr>  
  12.     <tr>  
  13.         <td>2</td>  
  14.         <td>Shrikant Steel</td>  
  15.         <td>General</td>  
  16.     </tr>  
  17.     <tr>  
  18.         <td>3</td>  
  19.         <td>Payal Furniture</td>  
  20.         <td>Special</td>  
  21.     </tr>  
  22.   
  23. </table>  
 

Answers (3)