layui.open子页面下拉框无法赋值
layer.open弹出一个页面的时候,下拉框赋值但不能刷新到选定的值。需要做如下调整:红色部分
layer.open({type: 2,title: ‘下拉框选中’,maxmin: false,skin: ‘layui-layer-lan’,shadeClose: true, //点击遮罩关闭层area : [‘50%’ , ‘56%’],content:’/index/1’,//弹框显示的url,对应的页面success : function(layero, index)layui.form.render();var iframe = layero.find(‘iframe’)[0].contentWindow;var body = layui.layer.getChildFrame(‘body’, index);body.find("#type").val(3);iframe.layui.form.render(‘select’);}});
评论
