common.js

Hinweis: Leere nach dem Veröffentlichen den Browser-Cache, um die Änderungen sehen zu können.

  • Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
  • Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
  • Internet Explorer/Edge: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
  • Opera: Strg+F5
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)';
			}
		});
	});
}
Keine Kategorien vergebenBearbeiten