前端开发天气插件:可以放在页面的任何地方

前端开发搭建服务器
vscode搭建前端开发
搭建前端开发

html 代码

<!DOCTYPE html>
    <head>
        <meta charset=”UTF-8″ />
        <title>天气</title>
        <meta name=”viewport” content=”width=device-width,initial-scale=1″ />
        <style type=”text/css”>
            .xc {
                width: 200px;
                margin: 0 auto;
            }
        </style>
    </head>
    <body>
        <div id=”tp-weather-widget” class=”xc”></div>
        <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.thinkpage.cn/widget/chameleon.js”))
        </script>
        <script>
            tpwidget(“init”, {
                “flavor”: “slim”,
             “location”: “WX4FBXXFKE4F”,
             “geolocation”: “disabled”,
             “language”: “zh-chs”,
             “unit”: “c”,
             “theme”: “chameleon”,
             “container”: “tp-weather-widget”,
             “bubble”: “enabled”,
             “alarmType”: “badge”,
             “color”: “#F47837”,
             “uid”: “U605DCADA4”,
             “hash”:”78f46a1198d54dafa0cda717efa717a9″
             });
            tpwidget(“show”);
        </script>
    </body>
</html>
搭建web前端开发平台
前端开发搭建本地服务器热更新
前端开发工程搭建
» 本文来自:前端开发者 » 《前端开发天气插件:可以放在页面的任何地方》
» 本文链接地址:https://www.rokub.com/6905.html
» 您也可以订阅本站:https://www.rokub.com
赞(0)
64K

评论 抢沙发

评论前必须登录!