一个博客中看到一个比较好的功能,能够显示时间日期以及地区天气情况:
主要代码:
<div class="welcome-info" style="margin-left: 20px;">
<div><span ></span></div>
</div>
<script type="text/javascript">
$('#weather').leoweather({ format: '{时段}好!,<span > {天气} </span>{夜间气温}℃ ~ {白天气温}℃' });
</script>
引用的js地址 : weather.js