layui中设置弹出层按钮的方法:

首先,layui的弹窗代码如下:

layer.open({
  skin: 'demo-class',
  content: '确认提交?',
  btn: ["取消", "确认"],
  yes: function (index) {
    layer.close(index)
  },
  btn2: function (index)&...