两种方法可以实现
1.第一种
layer.open({
type : 2,
title : ['重大报告', 'color:#fff;background-color:#2db7f5;'],
maxmin : true,
area : ['100%', '100%'],
content : "xxx.do?",
});
//area 属性的两个参数都写成 '100%'
2.第二种
var toIndex = layer.open({
type : 2,
title : ['重大报告', 'color:#fff;background-color:#2db7f5;'],
maxmin : true,
area : ['500px', '500px'],
content : "xxx.do?",
});
layer.full(toIndex);
//打开弹窗后 调用layer.full(Index) 方法,实现最大化
个人推荐 使用第二种