EasuUI-js(EasyUI formatter格式化教程)常用判断收集

YN标记:

formatter : function(c1, row,index) {
var a = "";
if(c1 == "Y"){
a = a + "<div style = "background-color:00FF"> 正确

";
}else if(c2 == "N"){

	a = a + "<div style = "background-color:FF0000"> 错误</div>";

}else{
	a;
}

NULL和非NULL判断 并且悬浮显示单元格内容:
//判断是否为空,若不为空显示答案并且鼠标悬浮显示
formatter : function(value, row, index) {
var a = "";
if(value == null){
}else{
return "" + value + "";
}
}
}

【推广】 免费学中医,健康全家人
原文地址:https://www.cnblogs.com/jpfss/p/6814017.html