当前位置:首页  »  科技  »  科技百科  »  文章  »  layer.open传参数到子页面

layer.open传参数到子页面

来源:网络 转载:百问网 时间:2022-04-17 17:03
导读layer.open传参数到子页面,父页面传参给子页面(iframe页面),代码:var index = layer.open({;title: '编辑';type: 1;shade: 0.2;maxmin: true;maxmin: true;shadeClose: true。

layer.open怎么传参数到子页面呢?不知道的小伙伴来看看小编今天的分享吧!

父页面传参给子页面(iframe页面):

代码:

var index = layer.open({

title: '编辑',

type: 1,

shade: 0.2,

maxmin: true,

shadeClose: true,

area: [openWH[0] + 'px', openWH[1] + 'px'],

offset: [openWH[2] + 'px', openWH[3] + 'px'],

content: content, //这里是iframe页面的路由

success: function(layero, index){

var body=layer.getChildFrame('body',index);

var fileId = body.contents().find("#fileId");

$(fileId.selector).val(data.id);

}

});

子页面

<input type="hidden" name="id" id="fileId"  placeholder="文件id" value=""

 class="layui-input">

以上就是小编今天的分享了,希望可以帮助到大家。

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。

标签:layer  open  子页面  
  • 热门焦点
Top
加载中...