天气预报调用代码

程序简介:
本天气预报的数据资源采自网络,代码可以根据页面浏览者的ip智能显示所在地天气预报。目前版本为第三版的测试版,提供部分文件下载到本地装载,从而使得调用更加稳定迅速,调用界面实现完全自定义。
程序演示:
实例代码:
<style>
	#MZ_weather { width:160px; vertical-align:middle; text-align:left;}
	#MZ_weather a { line-height:21px; text-decoration:none; color:#000;}
</style>
<div id="MZ_weather" style="display:none;">
	<!-- 模板开始 -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td align="right"><a title="点击查看更多信息" href="{url}" target="_blank" id="link">{city}<img src="/weather/images/{pic1}" width="35" height="21" />&nbsp;{temperature1}</a></td>
		</tr>
	</table>
	<!-- 模板结束 -->
</div>
<script>var cityId = 70000;</script>
<script src="/weather/load.js" language="javascript"></script>
标签详解:
<script>var cityId = 70000;</script>
<script src="/weather/load.js" language="javascript"></script>
上面代码中的“cityId”为指定的城市编号,如“70000”对应“长丰”,如果设置为“0”,即为更加用户IP自动显示所在地天气情况。
程序下载:
下载地址:http://www.mzoe.com/downfile/weather.rar (文件更新时间:2008-8-21 23:31)
安装说明:将解压的文件上传至服务器更目录下的“weather”文件夹即可。
其他调用方式(无需下载程序):
样式一:
<iframe src="http://weather.mzoe.com/call/1/70000.htm" height="35" frameborder="0"></iframe> 样式二:
<iframe src="http://weather.mzoe.com/call/2/70000.htm" height="35" frameborder="0"></iframe> 样式三:
<iframe src="http://weather.mzoe.com/call/3/70000.htm" height="70" width="200" frameborder="0"></iframe>
相关网站:
天气网(为您提供2401个城区未来五天的天气预报!) >>购买整站程序<<
交流中心:
http://bbs.mzoe.com/forumdisplay.php?fid=7
版权说明:
个人作品,仿造不究。