exam_edit.aspx.cs页(子页后台):
this.ClientScript.RegisterStartupScript(this.GetType(), "message", "parent.layer.closeAll();parent.setOption('好的','12');", true);
import_result.aspx(父页前台):
function setOption(key, value) {
var builder = "<option value='" + value + "'>" + key + "</option>";
$("#tongyi").append(builder);
$("#tongyi").find("option[value='" + value + "']").attr("selected", "selected");
layui.form().render('select');
}
即可完成,其中在刷新前台页select时出现小问题,总是报form is undefind.
最后通过
layui.form()解决问题。