由于某种原因,下面的代码没有应该着色。我做错了什么?
if (Group == 'Customer') {
if (Status != 'Agreement') {
cell.css('color', 'blue');
}
} else if (Group == 'Non-customer') {
if (Status == null) {
cell.css('color', 'green');
} else {
if (Status != 'Agreement') {
cell.css('color', 'yellow');
} else if (Status == 'Not declared') {
cell.css('color', 'purple');
}
}
}
答案 0 :(得分:0)
尝试以下方法:
if (Group == 'Customer') {
if(Status != 'Agreement') {
cell.css ('color', 'blue');
}
}
else if (Group == 'Non-customer') {
if (Staus == null) {
cell.css ('color', 'green');
}
else if (Status != 'Agreement') {
cell.css ('color', 'yellow');
}
else if (Status != 'Not declared') {
cell.css ('color', 'purple');
}
}