如何解决layui弹出层值回传的问题?

更新于
2026-09-28 11:01:34
1阅读来源:SEO资讯
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计341个文字,预计阅读时间需要2分钟。

如何解决layui弹出层值回传的问题?

如所示:layer.open({type: 2, title: 设置范围栏, shadeClose: true, shade: 0.4, area: ['90%', '90%'], content: /ElectronicFence/Mapid= + id + shapeType= + shapeType, btn: ['确定', '关闭'], yes: function(index) { // 当点击确定}}

如下所示:

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(); //打印返回的值,看是否有我们想返回的值。

阅读全文

本文共计341个文字,预计阅读时间需要2分钟。

如何解决layui弹出层值回传的问题?

如所示:layer.open({type: 2, title: 设置范围栏, shadeClose: true, shade: 0.4, area: ['90%', '90%'], content: /ElectronicFence/Mapid= + id + shapeType= + shapeType, btn: ['确定', '关闭'], yes: function(index) { // 当点击确定}}

如下所示:

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(); //打印返回的值,看是否有我们想返回的值。

阅读全文