-1
I have a table with several "td"(table data) and would like to adapt a Javascript code that selects these values from within the "td" and make comparisons so that, for example, when the value inside the "td" is above 5 the number is in red.
But it is a table with both numeric and string. example:
<tbody id ="tbl">
<tr>
<td>açaí</td>
<td>2</td>
</tr>
<tr>
<td>Coco</td>
<td>6</td>
</tr>
When making an IF to compare the number on with 5 or > , I can’t get the value. Am I referencing the tag wrong? would like to know if there is another solution since I use a table with TASTE and QUANTITY (strg and int)
Hello Ruan. Ask the question the code you tried to do.
– Sam