如下所示:
文件数据 body { background-color: #F0F0F0; } #content { margin-top: 2px; } #btns { float:left; } #btns .layui-btn { margin-top: 5px; } #Addbtn { margin-left: 20px; } .layui-btn { background-color: #3385ff; width: 120px; } #datatable { background-color: White; margin-top: 5px; clear:both; } .topbox { height: 50px; background-color: #ffffff; } .searchbox { float: right; margin-right: 20px; } .searchinput, .searchbtn { float: left; margin-top: 5px; } .searchinput { width: 300px; margin-left: 20px; } .searchbtn button { width: 80px; }
此页面为弹出框页面,选择某一列后,点击确定返回数据
layui.use('layer', function () {
var layer = layui.layer;
layer.open({
cache: false,
type: 2,
title: '对比',
skin: 'layui-layer-tb_125',
area: ['600px', '250px'],
content: '../ModelList/ModelMapNodeAttributeContrastForm',
moveOut: true,
zIndex: layer.zIndex,
btn: ['确定', '关闭'],
yes: function (index) {
//当点击‘确定'按钮的时候,获取弹出层返回的值
var resdata = window["layui-layer-iframe" + index].callbackdata();
//最后关闭弹出层
layer.close(index);
layui.use('layer', function () {
var layer = layui.layer;
layer.open({
type: 2,
title: '查看',
skin: 'layui-layer-tb_125',
area: ['600px', '250px'],
content: '../ModelList/ModelMapNodeAttributeDataForm?ContrastModelId=' + resdata["0"].modelid + '&ContrastModelName=' + resdata["0"].modelname + '&ContrastProductId=' + resdata["0"].productconfigid + '&aaaaaa=1',
moveOut: true,
zIndex: layer.zIndex,
cancel: function (index, layero) {
layer.close(index);
return true;
}, end: function () {
}
});
});
},
cancel: function (index) {
//右上角关闭回调
layer.close(index);
}
});
});
以上这篇layui 选择列表,打勾,点击确定返回数据的例子就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持考高分网。



