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

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

1.YN标记:

formatter : function(c1, row,index) {
var a = "";
if(c1 == "Y"){
a = a + "<div style = \"background-color:00FF\"> 正确</div>";
}else if(c2 == "N"){ a = a + "<div style = \"background-color:FF0000\"> 错误</div>"; }else{
a;
}
return a;

}

2.NULL和非NULL判断 并且悬浮显示单元格内容:

//判断是否为空,若不为空显示答案并且鼠标悬浮显示

formatter : function(value, row, index) {

var a = "";

if(value == null){

}else{

return "" + value + "";

}

}

}

3.通过与不通过判断

formatter : function(value, row, index) {

var a = "";

if(value == "A"){

a = a + "<div style="background-color:#ff0" >申请中

上一篇:SPRING IN ACTION 第4版笔记-第三章ADVANCING WIRING-005-Bean的作用域@Scope、ProxyMode


下一篇:关于t00ls的挂机脚本