function delArticle(articleId) { layer.confirm('确认删除?', { btn: ['确定','再想想'] //按钮 }, function(){ $.ajax({ url: contextPath + "/f/article/delete", data:{'id':articleId}, method: "post", success: function (data) { if(data.code == "200") { layer.msg(data.message, {icon: 1},function () { loadData('article'); },1000); }else { layer.msg('删除失败', {icon: 2}); } } }) layer.msg('的确很重要', {icon: 1}); }, function(){ layer.msg('谢谢不杀之恩', { time: 2000 }); }); }