当地天气调用

2019-01-21 02:37:50来源:博客园 阅读 ()

新老客户大回馈,云服务器低至5折

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
    body{
        color: red;
        background: #fff;
    }
    </style>
</head>

<body>
    <div class="weather">
        <iframe class="iframe" name="weather_iframe" scrolling="no" frameborder="0" allowtransparency="true" src="//i.tianqi.com/index.php?c=code&id=12&color=%23FFFFFF&icon=1&num=1&site=12"></iframe>
    </div>
    <div id="tp-weather-widget"></div>
    <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
    <script>
    (function(T, h, i, n, k, P, a, g, e) {
        g = function() {
            P = h.createElement(i);
            a = h.getElementsByTagName(i)[0];
            P.src = k;
            P.charset = "utf-8";
            P.async = 1;
            a.parentNode.insertBefore(P, a)
        };
        T["ThinkPageWeatherWidgetObject"] = n;
        T[n] || (T[n] = function() {
            (T[n].q = T[n].q || []).push(arguments)
        });
        T[n].l = +new Date();
        if (T.attachEvent) {
            T.attachEvent("onload", g)
        } else {
            T.addEventListener("load", g, false)
        }
    }(window, document, "script", "tpwidget", "//widget.seniverse.com/widget/chameleon.js"))
    
    tpwidget("init", {       
        "flavor": "slim",
               "location": "WX4FBXXFKE4F",
               "geolocation": "enabled",
               "language": "zh-chs",
               "unit": "c",
               "theme": "chameleon",
               "container": "tp-weather-widget",
               "bubble": "enabled",
               "alarmType": "badge",
               "color": "#F47837",
               "uid": "UC6AD9E048",
               "hash": "76465b415261736ddd08da3f7f9b24d0"   
    });   
    tpwidget("show");
    </script>
</body>

</html>

 


原文链接:https://www.cnblogs.com/Byme/p/10287785.html
如有疑问请与原作者联系

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:#WEB安全基础:HTML/CSS | 0x0 我的第一个网页

下一篇:博客园的推荐栏,怎么漂起来?