var rowss=table.rows.length; |
for ( var i=1;i<colums.length-1;i++){ |
var total=0; |
for ( var j=1;j<rowss;j++){ |
total=parseFloat(table.rows[j].cells[i].firstElementChild.value)+total; |
if (j==table.rows.length-1){ |
var hopeScore=arrayHope[i-1]; |
if (total!=hopeScore){ |
alert( "变色区域的值小于期望值!!!" ); |
for ( var g=1;g<table.rows.length;g++){ |
//当列变色 |
table.rows[g].cells[i].firstElementChild.style.backgroundColor = "#B8BFD8" ; |
if (g==table.rows.length-1){ |
return ; |
} |
} |
} |
else { |
for ( var g=1;g<table.rows.length;g++){ |
//当列变色 |
table.rows[g].cells[i].firstElementChild.style.backgroundColor = "#FFFFFF" ; |
} |
} |
} |
} |