How to do a button which change a background color of row base on the value from td. So if i hava value > 1000 my background color after click button must change
so now i have my table
function setColor(color) {
document.getElementById("vatek").style.backgroundColor = color;
};
#button1 {
background-color: #e47911;
}
<table class="button-box3">
<thead>
<tr>
<th>vatId</th>
<th>Desc</th>
<th>MPK</th>
<th>Quantity</th>
<th>Vat </th>
<th>Kwota Brutto</th>
<th>Wartosc Netto</th>
<th>Wartosc Brutto</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr id="vatek" class="active-row">
<td>1</td>
<td>xx</td>
<td>Stychurski</td>
<td>Manager</td>
<td>21.04.2020</td>
<td>20</td>
<td>2022</td>
<td>20</td>
<td>
<a href="#" type="button" class="submit-btn3" onclick="setColor('#e47911')">Change</a>
</td>
now i have when i click my button function only change my background color now i want to change if value from Wartosc Netto is > 1000 my background color of row must change .