如何实现 按钮点击弹出 iframe弹出框

提问 未结 7 108
Degenerare
Degenerare 2019-4-29
悬赏:50飞吻
版本:layui 浏览器:所有
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="layui/css/layui.css" media="all">
</head>
<body>

<div class="site-demo-button layui-input-inline" id="layerDemo" style="margin-bottom: 0;">
<button data-method="offset" data-tyoe="auto" type="button" class="layui-btn layui-btn-normal" onclick="click()">居中不显示</button>
</div>

<script src="layui/layui.js" charset="utf-8"></script>

<script>
layui.use('layer', function(){

layer.open({
type: 2,
title: '卫生详情页面',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['893px', '600px'],
content: 'aaa.html'
});

})

</script>

</body>
</html>


目前是加载好页面就打开弹出框了,想让它是点击按钮或者a标签打开弹出框
回帖