标签:eol uid lang listen date() object for code src
先把这个放在你想放的地方:
<div id="tp-weather-widget" class="mywth"></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.seniverse.com/widget/chameleon.js"))</script> <script>tpwidget("init", { "flavor": "slim", "location": "WWE0TGW4PX6N", "geolocation": "enabled", "language": "zh-chs", "unit": "c", "theme": "chameleon", "container": "tp-weather-widget", "bubble": "enabled", "alarmType": "badge", "uid": "UFFFC70B02", "hash": "8ca5fdc919e446872f170fb32648c78c" }); tpwidget("show");</script> <!--天气插件结束-->
官方网站:https://www.seniverse.com/widget?source=widgetV2
标签:eol uid lang listen date() object for code src
原文地址:https://www.cnblogs.com/HGNET/p/12286995.html