码迷,mamicode.com
首页 > 其他好文 > 详细

当地天气调用

时间:2019-01-18 15:39:21      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:for   creat   cat   get   title   else   src   []   argument   

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

 

当地天气调用

标签:for   creat   cat   get   title   else   src   []   argument   

原文地址:https://www.cnblogs.com/Byme/p/10287785.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!