父层代码
layer.open({
type: 2,
title:'供应商信息登记',
anim:2,
maxmin:1,
content: '/inGoodPage/upLayer',
area:['420px','500px'],
//resize:true,允许拖拽大小
success: function(layero){
//此id为页面层input标签id
var jquerySendHelloButton = $("#sid", layero.find("iframe")[0].contentWindow.document);
//要传的值
jquerySendHelloButton.attr("value", data.suppliersId );
}
})
重点:id一定要对应不然无法传值
页面层(iframe)代码
//传值直接就传入此标签中
<input type="text" id="sid" >