在对应JS的api中增加代码:
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"), function () {
}, function () {
}, function (success, error) {
layer.confirm('保存后,代码立即生效<br/>请仔细检查或先备份后操作!!', {
btn: ['确定', '取消'] //按钮
}, function (index) {
Form.api.submit($("form[role=form]"), function (data, ret) {
//如果我们需要在提交表单成功后做跳转,可以在此使用location.href="链接";进行跳转
setTimeout(function () {
parent.Layer.close(parent.Layer.getFrameIndex(window.name));
//刷新页面
window.parent.location.reload();
}, 1000);
});
Layer.close(index);
}, function () {
});
return false;
});
}
},