我可不是为了被全人类喜欢才活着的,只要对|

王陸

园龄:6年11个月粉丝:2052关注:178

心知天气网页调用源码

最近给我的博客新加了天气预报功能,首先需要注册心知天气账号https://www.seniverse.com/widget/create

自动生成安装代码

将其复制到“设置”->“页脚Html代码”中

复制代码
<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"))</script>
<script>tpwidget("init", {
    "flavor": "bubble",
    "location": "WWE0TGW4PX6N",
    "geolocation": "enabled",
    "position": "top-right",
    "margin": "10px 10px",
    "language": "zh-chs",
    "unit": "c",
    "theme": "chameleon",
    "uid": "U7723B164C",
    "hash": "554f0133ab6532c8a7724fcc5cc06361"
});
tpwidget("show");</script>
复制代码

 

本文作者:王陸

本文链接:https://www.cnblogs.com/wkfvawl/p/9412847.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   王陸  阅读(2802)  评论(8编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起