1、获取input中的值:【content页面】
<div style="padding: 0 10px;margin-top:10px">
    <input type="text" id="refuseReason" name="refuseReason" placeholder="请输入拒绝理由" class="layui-input">
</div>
父页面
layer.open({
    type:1,
    title:"拒绝理由",
    content:'<div style="padding: 0 10px;margin-top:10px">'+
                            '<input type="text" id="refuseReason" name="refuseReason" placeholder="请输入拒绝理由" class="layui-input">'+
                    '</div>',
    area: ['500px', '150px'],
    btn: ['提交', '取消'],
    btnAlign:'c',
    resize:true,
    yes:(index,layero)=>{
            // 获取content页面中id为refuseReason的值
        const refuseReason = top.$('#refuseReason').val();
    },
    cancel:(index, layero)=>{}
})
2、获取select中选中的值:【content页面】
  <select id="groupId" name="groupId" xm-select="group">
      <span th:each="info : ${groupList}">
<option th:text="${info.st_g_name}" th:value="${info.st_g_id}"></option>
      </span>
  </select>
父页面
layer.open({
    type: 2,
    title: "标题",
    area: ['600px', '500px'],
    content: "/page/layerOpen", //请求后端返回页面地址
    btn: ['提交', '取消'],
    yes: function(index, layero){
        //得到iframe页的窗口对象,执行iframe页的方法:
        var iframeWin = window[layero.find('iframe')[0]['name']];
        // 获取页面中xm-select属性为group的下拉选择框选中的值
        var selectGroupData = iframeWin.layui.formSelects.value('group', 'val');
        console.log(selectGroupData);
    }
})
The End





大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)