<h1 story="color:red">layui.js---layer;;前端预览pdf</h1>
1.必须引入layui.js
2.uul是pdf文件地址
3.触发function函数:小于号button onclick="pdfsee('/Qaul_pdf/33.pdf')">预览</button>
<script src="https://www.layuicdn.com/layui/layui.js"></script>//引入layui.js
<script type="text/javascript">
function pdfsee(uul) {
layui.use('layer', function () {
var layer = layui.layer;
layer.open({
type: 2,
area: ['1000px', '750px'],
fixed: false, //不固定
maxmin: true,
content: uul
});
});
};
</script>