html_css_jq_php_wp吧 关注:4,202贴子:15,506
  • 1回复贴,共1

大神求助,小白无法理解的语句

只看楼主收藏回复

正确语句:
------------------------------》》》》》
,{field: 'order_status',title: '验/密',width:100,align: 'center',templet:function (res) {
return res.order_status=='3'?'<span style="color: red">验证失效</span>' :'<span style="color: White">密码错误</span>' ;
}}
----------------------》》》》》》
// 如果数值是3则显示“验证失败”,否则显示“密码错误”
上面是二选一的结果,可是我还想实现如果数值是 1 则显示“待处理”否则显示已处理,
所以我理所当然就加了一句 returm......,可是没有效果,求正解!!
-------》》》》》》》》
,{field: 'order_status',title: '状态',width:80,align: 'center',templet:function (res) {
return res.order_status=='3'?'<span style="color: red">验证失效</span>' :'<span style="color: White">密码错误</span>' ;
return res.order_status=='1'?'<span style="color: red">待处理</span>' :'<span style="color: green">已处理</span>' ;
}}
------------------------》》》》》》》》》


1楼2020-11-17 20:06回复
    微信关注公众号:文娱课堂。回复:制作
    领取李炎恢老师基础实战网站制作视频教程 htmlDIV+CSSASP全套视频教程哦!


    IP属地:广东来自Android客户端2楼2021-01-12 04:45
    回复