一、首先引用js文件
<script src="../../js/common/layer/layer.js"></script>
二、全屏调用以下代码
var index = layer.open({ type: 2, content: url, area: [‘300px‘, ‘195px‘], title: false, maxmin: true, closeBtn: 0 }); layer.full(index);
三、关闭弹出层
<input type="button" value="关闭" />
<script>
function closetest(){
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}
</script>
四、获取父窗口值
alert(window.parent.document.getElementById("id").value);
时间: 2024-11-05 09:07:37