In table, How to change the colour of entire row to green when the last coloum value is "successful" | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

In table, How to change the colour of entire row to green when the last coloum value is "successful"

similarly change the colour of row to red when last coloum value is "failed" using jsp only

22nd May 2018, 1:38 PM
Arushi Kulshreshtha
Arushi Kulshreshtha - avatar
1 Respuesta
+ 1
reading the value of the td element you care about, you can get the closest tr anchestor element and style its background color. https://developer.mozilla.org/en-US/docs/Web/API/Element/closest something like var row= yourTDel.closest('tr'); row.style.backgroundColor='red';
22nd May 2018, 2:50 PM
seamiki
seamiki - avatar