• <i id='ZrWN5'><tr id='ZrWN5'><dt id='ZrWN5'><q id='ZrWN5'><span id='ZrWN5'><b id='ZrWN5'><form id='ZrWN5'><ins id='ZrWN5'></ins><ul id='ZrWN5'></ul><sub id='ZrWN5'></sub></form><legend id='ZrWN5'></legend><bdo id='ZrWN5'><pre id='ZrWN5'><center id='ZrWN5'></center></pre></bdo></b><th id='ZrWN5'></th></span></q></dt></tr></i><div id='ZrWN5'><tfoot id='ZrWN5'></tfoot><dl id='ZrWN5'><fieldset id='ZrWN5'></fieldset></dl></div>
      <tfoot id='ZrWN5'></tfoot>

        <bdo id='ZrWN5'></bdo><ul id='ZrWN5'></ul>

      1. <legend id='ZrWN5'><style id='ZrWN5'><dir id='ZrWN5'><q id='ZrWN5'></q></dir></style></legend>

        <small id='ZrWN5'></small><noframes id='ZrWN5'>

        父窗口获取layer.open()打开的子窗口的数据

        1.获取子页面的表格多选框选中的数据 var index = layer.open({ type: 2, title: '标题', maxmin: true, shadeClose: false, // 点击遮罩关闭层 area: ['800px', '520px'], //子页面大小 btn: ['按钮名称'], btnAlign: 'c', content: '请求路径', // iframe的

        <i id='oYCfG'><tr id='oYCfG'><dt id='oYCfG'><q id='oYCfG'><span id='oYCfG'><b id='oYCfG'><form id='oYCfG'><ins id='oYCfG'></ins><ul id='oYCfG'></ul><sub id='oYCfG'></sub></form><legend id='oYCfG'></legend><bdo id='oYCfG'><pre id='oYCfG'><center id='oYCfG'></center></pre></bdo></b><th id='oYCfG'></th></span></q></dt></tr></i><div id='oYCfG'><tfoot id='oYCfG'></tfoot><dl id='oYCfG'><fieldset id='oYCfG'></fieldset></dl></div>
      2. <legend id='oYCfG'><style id='oYCfG'><dir id='oYCfG'><q id='oYCfG'></q></dir></style></legend>
        • <small id='oYCfG'></small><noframes id='oYCfG'>

            <tbody id='oYCfG'></tbody>

            <tfoot id='oYCfG'></tfoot>
                <bdo id='oYCfG'></bdo><ul id='oYCfG'></ul>
                  1.获取子页面的表格多选框选中的数据
                   var index = layer.open({
                          type: 2,
                          title: '标题',
                          maxmin: true,
                          shadeClose: false, // 点击遮罩关闭层
                          area: ['800px', '520px'], //子页面大小
                          btn: ['按钮名称'],
                          btnAlign: 'c',
                          content: '请求路径', // iframe的url
                          yes: function (index, layero) { //按钮【按钮一】的回调
                              //获取弹出层容器
                              var iframeWin = window[layero.find('iframe')[0]['name']];  
                              //获取弹出层$('#exampleTable').bootstrapTable选中行数据            
                              var rows = iframeWin.$('#exampleTable').bootstrapTable('getSelections');
                              
                              //获取到表格的选中行数据,进行后续操作
                              for(let i; i < rows.length; i++){
                                  console.log(rows[i].id) //id是该行内的属性
                              }             
                   
                              layer.close(index);
                          }
                      });
                      layer.full(index); //弹出层全屏显示
                  2.获取子页面的表格单选框选中的数据
                      var index = layer.open({
                          type: 2,
                          title: '标题',
                          maxmin: true,
                          shadeClose: false, // 点击遮罩关闭层
                          area: ['800px', '520px'],
                          btn: ['按钮名称'],
                          btnAlign: 'c',
                          content: '请求路径', // iframe的url
                          yes: function (index, layero) {
                              //按钮【按钮一】的回调
                              let obj = layero.find('iframe')[0].contentWindow;
                              let list = obj.getSelection();
                   
                              console.log(list[0].id);
                   
                              layer.close(index);
                          }
                      });
                      layer.full(index);
                  3.获取子页面的input值,及给子页面的input赋值
                   var index = layer.open({
                          type: 2,
                          title: '标题',
                          maxmin: true,
                          shadeClose: false, // 点击遮罩关闭层
                          area: ['800px', '520px'],
                          btn: ['按钮名称'],
                          btnAlign: 'c',
                          content: '请求路径', // iframe的url
                          success: function (layero, index) {
                              //成功回调,给子页面赋值
                              var body = layer.getChildFrame('body', index); //得到iframe页的body内容
                              body.find("#子页面id").val('赋值');
                          },
                          yes: function (index, layero) {
                              //按钮【按钮一】的回调,获取子页面的值
                              var body = layer.getChildFrame('body', index); //得到iframe页的body内容
                              console.log(body.find("#子页面id").val());
                              
                              layer.close(index);  //关闭子页面
                          }
                      });
                      layer.full(index);
                   
                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  1、通过对象遍历参数 function GetUrlRequest() { var url = location.search; //获取url中"?"符后的字串 var tRequest = new Object(); if (url.indexOf("?") != -1) { //判断 URL 中是否包含查询字符串 var str = url.substr(1); //如果 URL 中包含查询字符
                  1.InfoWindow的样式,百度是没用提供直接使用的样式表的,目前都是热心网友在实际开发中自己的经验和实战总结; 2.百度提供了InfoBox富文本标签弹出框的接口,引入InfoBox.js,即可自定义样式或丰富的边框功能,但是鼠标单击下一个标注时,已经弹出的模态框
                  layui从数据库中获取复选框的值并默认选中,详细代码: !doctype htmlhtml lang="en"headmeta charset="UTF-8"title/titlelink rel="stylesheet" type="text/css"href="../../../static/js/css/layui.css" rel="external nofollow" media="all"link rel="styl
                  场景需求: 在layui.table上面渲染后的列表上面加一个switch开关,监听switch开关的动作,实现本列数据的状态切换! 数据表格配置参数 layui.table.options.cols配置如下、重点看 state 那一行 table.render({ elem: '#demo' ,height: 312 ,url: '/demo/tabl
                  获取表单控件原始值的方法,通常是用于表单的重置操作或是表单提交前的数据检查。以下是一些常见的方法:
                  当使用 for 循环批量注册事件时,经常会遇到无法正确捕获循环变量 i 的问题。这是因为循环结束后,i 的值会变成循环内最后一个迭代的值。这个问题通常称为 JavaScript 的闭包问题。下面是一个简单的示例说明:

                  <small id='Msw0V'></small><noframes id='Msw0V'>

                  <legend id='Msw0V'><style id='Msw0V'><dir id='Msw0V'><q id='Msw0V'></q></dir></style></legend>
                    <i id='Msw0V'><tr id='Msw0V'><dt id='Msw0V'><q id='Msw0V'><span id='Msw0V'><b id='Msw0V'><form id='Msw0V'><ins id='Msw0V'></ins><ul id='Msw0V'></ul><sub id='Msw0V'></sub></form><legend id='Msw0V'></legend><bdo id='Msw0V'><pre id='Msw0V'><center id='Msw0V'></center></pre></bdo></b><th id='Msw0V'></th></span></q></dt></tr></i><div id='Msw0V'><tfoot id='Msw0V'></tfoot><dl id='Msw0V'><fieldset id='Msw0V'></fieldset></dl></div>

                        <tfoot id='Msw0V'></tfoot>

                          <bdo id='Msw0V'></bdo><ul id='Msw0V'></ul>
                            <tbody id='Msw0V'></tbody>