I have an HTML table with a lot of numbers.
Is it possible to have a table cell change background color if the value inside that cell (or column) equals or is less than
Try this one
var table = document.getElementById("tableId"); var row = table.rows[rowIndex]; var cell = row.cells[cellIndex]; var cellValue = Number(cell.innerHTML); if (cellValue > 3000) cell.style.backgroundColor = "red";