IT科技

當前位置 /首頁/IT科技 > /列表

open傳參數到子頁面,layer

父頁面傳參給子頁面(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'],

layer.open傳參數到子頁面

content: content, //這裏是iframe頁面的路由

success: function(layero, index){

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

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

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

}

});

layer.open傳參數到子頁面 第2張

子頁面

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

 class="layui-input">

TAG標籤:參數 頁面 layeropen 到子 #