三個按鈕:
,btn: ['撥打','掛斷','關閉'] css
'撥打','掛斷' 這兩個是不一樣時出現的。jsp
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) { } });
控制的代碼就是:ide
$("a.layui-layer-btn0").show(); $("a.layui-layer-btn1").hide();