网站Mini天气显示代码

2021-09-08 10:26:28 浏览数 (1)

位置显示在左上角,根据IP计算位置,不占空间,放在公告代码里面即可

代码语言:javascript复制
<div id="tp-weather-widget"></div>
<!-- 天气插件 -->
		<script>
			(function(a,h,g,f,e,d,c,b){b=function(){d=h.createElement(g);c=h.getElementsByTagName(g)[0];d.src=e;d.charset="utf-8";d.async=1;c.parentNode.insertBefore(d,c)};a["SeniverseWeatherWidgetObject"]=f;a[f]||(a[f]=function(){(a[f].q=a[f].q||[]).push(arguments)});a[f].l= new Date();if(a.attachEvent){a.attachEvent("onload",b)}else{a.addEventListener("load",b,false)}}(window,document,"script","SeniverseWeatherWidget","//CDN.sencdn.com/widget2/static/js/bundle.js?t=" parseInt((new Date().getTime() / 100000000).toString(),10)));
			window.SeniverseWeatherWidget('show', {
			flavor: "bubble",
			location: "WX4FBXXFKE4F",
			geolocation: true,
			language: "zh-Hans",
			unit: "c",
			theme: "auto",
			token: "ac1d036a-99f3-4f88-ae98-f795bb93a9f0",
			hover: "disabled",
			container: "tp-weather-widget"
			})
		</script>
<!-- 天气插件 -->
ip

0 人点赞