layer 弹出层插件
作者:互联网
1.引入layer.js 文件
2.请求时layer 遮罩层
2.请求时layer 遮罩层
var index = null; $.ajax({ url: "", data: { Id}, dataType: "json", async: false, type: "post", async: false, beforeSend: function () { index = layer.load(2); }, success: function (data) { layer.close(index); if (data.Result) { layer.alert("相关附件已发送至邮箱中,请查收", { icon: 6 }); } else { layer.alert("发送附件失败", { icon: 2 }); } }, error: function (jqXHR, textStatus, errorThrown) { layer.close(index); layer.alert("请求异常!", { icon: 5 }); } });View Code
标签:function,index,插件,layer,alert,弹出,data,icon 来源: https://www.cnblogs.com/xueworks/p/16396509.html