unction btn_add() {
layer.open({
type: 0,//type类型
title: '文本',//弹窗标题
content: '是否新增',//弹窗内容
btn: ['是', '否'],
})
return
$.layerOpen({
id: "add",
title: "新增用户",
width: "670px",
height: "530px",
content: "/System/User/Form",
yes: function (iBody) {
iBody.find('#btnSubmit').click();
initGrid();
console.log(132);
}
});
}
怎么样在点击是的按钮后能运行新增用户的代码
判断他是否被点击呗。 点击之后运行的function方法里面放新增方法就行了
$("#add").onclick(function (){
$.layerOpen({
id: "add",
title: "新增用户",
width: "670px",
height: "530px",
content: "/System/User/Form",
yes: function (iBody) {
iBody.find('#btnSubmit').click();
initGrid();
console.log(132);
}
})