• 00019-layui 控制 layer.open 的按钮


    三个按钮:
    ,btn: ['拨打','挂断','关闭']

    '拨打','挂断' 这两个是不同时出现的。

    var dialog = layer.open({
        type: 2
        ,title: '拨打电话'
        ,content: 'customerPhone.jsp'
        ,maxmin: true
        ,area: layui.setter.area_percent
        ,offset:'t'
        ,btn: ['拨打','挂断','关闭']
        ,btnAlign: 'c'
        ,success:function(layero,index){
            window.formData = rec;
            window.formData = $.extend(rec,{
                seatStatus:$("#seatStatus").val(),
                callType:$("#callType").val(),
            });
            $("a.layui-layer-btn1").css("background-color","#FF5722");
            setTimeout(function () {
                callPhone(rec.id,rec.mobile);
                $("a.layui-layer-btn0").hide();
                $("a.layui-layer-btn1").show();
            },500)
        }
        ,yes:function (index, layero) {
            callPhone(rec.id,rec.mobile);
            $("a.layui-layer-btn0").hide();
            $("a.layui-layer-btn1").show();
            return false;
        }
        ,btn2:function (index, layero) {
            hangUpPhone();
            $("a.layui-layer-btn0").show();
            $("a.layui-layer-btn1").hide();
            return false;
        }
        ,btn3:function (index, layero) {
    
        }
    });
    

    控制的代码就是:

            $("a.layui-layer-btn0").show();
            $("a.layui-layer-btn1").hide();
    
  • 相关阅读:
    187A Permutations
    DFS 专题 哈密顿绕行世界问题
    DFS 专题 N皇后
    DFS专题 Prime Ring Problem
    USACO section1.1 Broken Necklace
    USACO section1.2 Dual Palindromes
    PHPUnitWriting Tests for PHPUnit
    PHP 定界符 使用技巧
    concat函数
    mysql_free_result
  • 原文地址:https://www.cnblogs.com/jianquan100/p/13034258.html
Copyright © 2020-2023  润新知