弹出没有任何反映
hg199
hg199 2019-02-16 09:31:40
[jQuery讨论组]

<!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>


hg199
hg199

全部回复(1)
Time

你好,在下方

layer.open({})中要添加   html文件的路径

    比如我把文件这个html文件放在了suorg中  路径就是 content: 'suorg/aler.html'


  • 回复 是差了一个逗号
    hg199 作者 2019-02-21 21:41:54
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号