📅 财经日历 📊 实时波动 📈 大盘云图 📶 行情走势 🆚 投机情绪 🚀 今日热点

    网站弹出层代码

    admin LV20
    2017-11-29 · 1551 阅读
    1. <!DOCTYPE html>
    2. <html>
    3. <head>
    4.   <meta charset="utf-8">
    5.   <title>开始使用layer</title>
    6. </head>
    7. <body>
    8. <script src="http://www.eazhijia.com/template/cmsoft_economy_141230/cmsoft/js/jquery.js" type="text/javascript"></script>
    9. <script src="http://res.layui.com/layui/release/layer/dist/layer.js"></script>
    10. <span id="hello3">
    11. <script>
    12.   $('#parentIframe').on('click', function(){
    13.     layer.open({
    14.       type: 2,
    15.       title: '财经日历',
    16.       maXMin: true,
    17.       shadeClose: true, //点击遮罩关闭层
    18.       area : ['800px' , '520px'],
    19.       content: 'http://viewapi.kxt.com/rili/'
    20.     });
    21.   });
    22.   </script>
    23.   </span>
    24.   <li><a id="parentIframe" href="javascript:;">财经日历</a></li>
    25. <script>!function(){for(var i =1;i <=5;i++){new Function($('#hello'+ i).text())();}
    26. }();</script>
    27.   </body>
    28. </html>
    复制代码


    注意:jQuery要在layui.js前面加载
    ""
    还没有人打赏,支持一下
    回复

    举报

     
    您需要登录后才可以回帖 登录 | 注册

    提醒: 禁止引战、谩骂、灌水内容

    微信二维码

    有问题联系客服