如何在代码中添加if条件,以便我可以启用/禁用基于布尔值的值?我已经定义了布尔变量isEnable

【问题描述】:

如何在代码中添加if 条件,以便我可以启用/禁用基于布尔值的值?

我已经定义了布尔变量isEnable。根据 isEnable 的值,我想启用/禁用下拉值 <option value=”Close”> Close Amount</option>。

类似 – if(isEnable) then enable or disable Close Amount dropdown value

Account.js

initGrid : function() {

            var self=this;
            this.isEnable= false;
            this._onlineIDDetailsGrid = this.findControl("#onlineIDDetailsGrid").DataTable({
                "columnDefs":[{className: "dt-body-center", "targets": [ 0,3,4,5]}],

                "columns": [
                        {
                            "title" : "Actions",
                            "render": function (data, type, full) {         

                                if ((self._access == CBTFLASH.UTILS.Constants.FULLCONTROL_ACCESS))              
                      
                                    return '
Select Action

Suspend
Unsuspend
Revoke
Close Amount--------------------> This dropdown option

Block/Unblock Zelle Token';
                            }   
                        },
}

【问题讨论】:

© 版权声明
THE END
喜欢就支持一下吧
点赞122赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容