获取layer.open弹出层的返回值
layer.open({ type: 2, title: "设置围栏", shadeClose: true, shade: 0.4, area: ['90%', '90%'], content: "/ElectronicFence/Map?id=" + id + "&shapeType=" + shapeType, btn: ['肯定','关闭'], yes: function(index){ //当点击‘肯定’按钮的时候,获取弹出层返回的值 var res = window["layui-layer-iframe" + index].callbackdata(); //打印返回的值,看是否有咱们想返回的值。 console.log(res); //最后关闭弹出层 layer.close(index); }, cancel: function(){ //右上角关闭回调 } });
详情见:https://www.cnblogs.com/fjzhang/p/6232148.htmlhtml
layer一款web弹层组件,其中有关于irame-父子操做可查看一下连接学习web
http://layer.layui.com/?alonepost