关于jsonp访问天气预报功能
2016-08-17 00:31
253 查看
写了一段关于访问天气预报功能小代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(function(){
//alert('load....');
$.get('https://api.thinkpage.cn/v3/weather/now.json?key=pqco8hlgjeuvsdu3&location=beijing&language=zh-Hans&unit=c',function(data){
$.each(data.results,function(i,da){
alert('i:'+da.location.id+da.location.name);
});
});
});
</script>
<!--script type="text/javascript" src="https://api.thinkpage.cn/v3/weather/now.json?key=pqco8hlgjeuvsdu3&location=beijing&language=zh-Hans&unit=c"></<script-->
</head>
<body>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(function(){
//alert('load....');
$.get('https://api.thinkpage.cn/v3/weather/now.json?key=pqco8hlgjeuvsdu3&location=beijing&language=zh-Hans&unit=c',function(data){
$.each(data.results,function(i,da){
alert('i:'+da.location.id+da.location.name);
});
});
});
</script>
<!--script type="text/javascript" src="https://api.thinkpage.cn/v3/weather/now.json?key=pqco8hlgjeuvsdu3&location=beijing&language=zh-Hans&unit=c"></<script-->
</head>
<body>
</body>
</html>
相关文章推荐
- android使用soap协议访问webservice实现天气预报功能
- android使用soap协议访问webservice实现天气预报功能
- 在asp.net中 利用雅虎天气API做天气预报功能
- 为你的 Blog 添加“天气预报”功能。
- 关于天气预报可能用到的网上链接
- 获取天气预报功能
- [转改]为你的 Blog 添加“天气预报”功能。
- 根据访问用户IP地址自动获取天气预报
- 实现天气预报功能
- jQuery访问xml文件显示天气预报
- 为blog添加天气预报功能
- 微信公众平台开发应用(天气预报、股票查询、手机归属地查询、在线听音乐、翻译、成绩查询等功能)代码分享如下
- 为你的 Blog 添加“天气预报”功能。
- Qt 使用 QtScript 解析JSON 以及在软件中加入天气预报功能
- 基于HTML5 geolocation 实现的天气预报功能
- python 实现天气预报功能
- 用WebService实现调用新浪的天气预报功能
- [Webservice]关于天气预报查询软件的查询原理(一)
- Flex 调用WEBService 接口实现天气预报功能.