layui 子页面修改父页面的值
<input value="跟俺老师" id="followTeacherId" type="text" name="followTeacherId" lay-verify="required" autocomplete="off" placeholder="请选择跟班老师" class="layui-input"/>
父页面 function choiceTeacher(idFlag){
var path = $.parsePath().replace("add", "")+"teacherChoice.xhtml";
layer.open({
type: 1,
area: ['700px', '450px'],
fixed: false, //不固定
maxmin: true,
content: path
});
}
子页面修改父页面的值 parent.$('#followTeacherId').val('跟班老师');
但是修改不成功