<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="../static/plugins/layui/css/layui.css">
<script type="text/javascript" src="../static/plugins/layui/layui.js"></script>
<style type="text/css">
.header{width:100%; height:50px; background-color: #2e6da4; line-height: 50px;}
.header_conter{margin:0px auto; width:80px; height: 50px; background-color: #2e6da4;color:#fff; font-size: 21px;line-height:50px;display: block; border-color:#2e6da4;}
</style>
</head>
<body>
<div>
<button onclick="add1()">加表格</button> </div>
<script type="text/javascript">
layui.use(['layer'] function () {
layer=layui.layer;
$=layui.jquery;
})
function add1() {
layer.open({
type: 2,
title:'我的增加',
area:['480px','120px'],
content: 'add.html' ,
})
};
</script>
</body>
</html>
Time2019-02-20 17:37:02
Hello, you need to add the path of the html file in
layer.open({}) below
For example, if I put the html file in suorg, the path is content: 'suorg/aler.html'