layui 弹出层打开,关闭父级页面

前端   2024-11-22 10:45   66   0  

打开弹窗

  function open_Layer()
  {
      
      var height = ($(window).height())+ "px";
      var width = ($(window).width())+ "px";
      var top = 0;
      parent.layer.open({
          type: 2,
          title: false,
          area: [width, height],
          //skin: 'layui-layer-rim', //加上边框
          content: ["@Url.Content("~/aa/aa_edit?page=abc&gh=")"+acc],
          shadeClose: true,
          closeBtn: 1,
          end: function () { 
              GetList();
          }
      });
    }

关闭父级页面

parent.layer.close(parent.layer.getFrameIndex(window.name));  //关闭父级窗体