Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 5: | Zeile 5: | ||
if (cell.innerText == '') { | if (cell.innerText == '') { | ||
cell.style.backgroundColor = 'RGBA(85,83,108,0.4)'; | cell.style.backgroundColor = 'RGBA(85,83,108,0.4)'; | ||
}else if (cell.innerText = | }else if (cell.innerText = 0) { | ||
cell.style.backgroundColor = 'red'; | cell.style.backgroundColor = 'red'; | ||
}else if (cell.innerText > 15 && cell.innerText <=20) { | }else if (cell.innerText > 15 && cell.innerText <=20) { |
Aktuelle Version vom 10. März 2023, 07:40 Uhr
var t = document.getElementById('bitv');
if(t) {
Array.from(t.rows).forEach((tr, rowIdx) => {
Array.from(tr.cells).forEach((cell, cellIdx) => {
if (cell.innerText == '') {
cell.style.backgroundColor = 'RGBA(85,83,108,0.4)';
}else if (cell.innerText = 0) {
cell.style.backgroundColor = 'red';
}else if (cell.innerText > 15 && cell.innerText <=20) {
cell.style.backgroundColor = 'RGBA(170,214,136,0.4)';
}else if (cell.innerText > 20 && cell.innerText <=25) {
cell.style.backgroundColor = 'RGBA(152,195,119,0.6)';
}else if (cell.innerText > 25 && cell.innerText <=30) {
cell.style.backgroundColor = 'RGBA(139,189,120,0.9)';
}else if (cell.innerText > 30 && cell.innerText <=60) {
cell.style.backgroundColor = 'RGBA(94,167,88,0.9)';
}else if (cell.innerText > 60 && cell.innerText <=150) {
cell.style.backgroundColor = 'RGBA(88,157,65,0.3)';
}else if (cell.innerText > 150 && cell.innerText <=10000) {
cell.style.backgroundColor = 'RGBA(95,160,97,0.6)';
}else if (cell.innerText > 10000 && cell.innerText <=20000) {
cell.style.backgroundColor = 'RGBA(105,170,90,0.7)';
}else if (cell.innerText > 20000 && cell.innerText <=30000) {
cell.style.backgroundColor = 'RGBA(115,164,76,0.6)';
}else if (cell.innerText > 30000) {
cell.style.backgroundColor = 'RGBA(98,143,94,0.4)';
}
});
});
}