天气预报代码大全 天气预报代码显示天气

//给你一个网址

//://m.weather.cn/data/101010100.html

//://blog.csdn.net/hello_haozi/article/details/7564223

NSString *shangHai = @"://m.weather.cn/data/101020100.html";

NSOperationQueue *queue = [[NSOperationQueue alloc] init];

NSURL *url1 = [NSURL URLWithString:shangHai];

NSURLRequest *request1 = [[NSURLRequest alloc] initWithURL:url1];

[NSURLConnection sendAsynchronousRequest:request1 queue:queue completionHandler:^(NSURLResponse *response, NSData *da, NSError *error) {

if (da) {

NSDictionary *shangHaiDict = [NSJSONSerialization JSONObjectWithData:da options:NSJSONReadingMutableLees error:&&error];

NSLog(@"%@",shangHaiDict);

}

}];

这是上海的天气 ,不知道是否回答了你的问题

求网站中加入天气预报的代码

代码如下:

&<iframe id=weatherwin border=0 name=weatherwin marginWidth=0 marginHeight=0 src="://weather.369/weather.html" frameBorder=no width=160 scrolling=no height=60&>&</iframe&>

也可以用265的代码.在那里上网就显示那里的天气

flash天气预报代码

下面这段是它的源文件

&<html&>

&<head&>

&<meta -equiv="Content-Type" content="text/html; charset=GBK" /&>

&<title&>07越秀&</title&>

&<link href="../css/ddg.css" rel="stylesheet" type="text/css"&>

&</head&>

&<body&>

&<table width="100%" height="80" border="0" cellpadding="0" cellspacing="0"&>

&<tr&>

&<td height="15"&>&<img src="images/spacer.gif" width="1" height="8" /&>&</td&>

&</tr&>

&<tr&>

&<td width="60" align="center" valign="top"&>&<!--5-12修改6开始--&>&<img src="://weather.news.163/weather/images/logo/01.gif" alt="" /&>&<img src="://weather.news.163/weather/images/logo/03.gif" alt="" /&>&<!--5-12修改6结束--&>&</td&>

&<td align="left" valign="top"&>&<font id="dateFont"&>2007年1月16日&<br /&>

星期二 下午17:02&<br /&>

&</font&>

&<script&>

var day = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");

function showDate()

{

font = document.getElementById("dateFont");

var now = new Date();

var str = "";

var hours = now.getHours() + "";

if(hours.length &< 2)

{

hours = "0" + hours;

}

var minutes = now.getMinutes() + "";

if(minutes.length &< 2)

{

minutes = "0" + minutes;

}

var seconds = now.getSeconds() + "";

if(seconds.length &< 2)

{

seconds = "0" + seconds;

}

str += "&<font style=\"color:#000000;\"&>&<b&>" + now.getFullYear() + "年" + (now.getMonth() + 1) + "月" + now.getDate() + "日&</b&>&</font&>&<br&>&<font style=\"color:#EB7002;\"&>" + day[now.getDay()] + " " + hours + ":" + minutes + ":" + seconds + "&</font&>&<br&>";

font.innerHTML = str;

}

setInterval("showDate()" , 1000);

&</script&>

&<font&>

多云转阵雨 ? 25℃~34℃

&</font&>&</td&>

&</tr&>

&<tr&>

&<td height="8"&>&<img src="images/spacer.gif" width="1" height="8" /&>&</td&>

&</tr&>

&</table&>

&</body&>

&</html&>

再给你推荐一个根据不同IP显示不同地区的代码:

&<iframe src="://.ttyyy/tianqi/tq.html" width="160" height="60" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"&>&</iframe&>

都试试吧

可选择城市的天气预报代码

天气预报FLASH代码1-浅色款://aw.awflasher/getweather.swf"&</A&> width="190" height="200" type="lication/x-shockwe-flash"&>&</embed&>

求天气预报代码

&<center&>&<p&>&<b&>天 气 预 报&</b&>&</cenier&>

&<center&>&<iframe width=157 height=240 frameborder=0 scrolling=NO src='://news.qq/cgi-bin/news_qq_search?city=城市名称&>&</iframe&>&</center&>

说明:城市名称写下面的代码

中国其他各省(区)天气的代码只需将上述代码中的 cncn 换成下列字符串:

广东: gudp 福建: fujp 浙江: zhjp 江苏:jsup 安徽: anhp 山东: shdp

海南: hanp 广西: guxa 贵州: guzp 云南:yunp 四川: sicp 陕西: saxp

河南: henp 河北: hebp 山西: shxp 内蒙古:nema 辽宁: linp 吉林: jilp

黑龙江: hljp 湖北: hubp 湖南: hunp 江西:jixp 甘肃: gasp 宁夏: nixa

青海: qihp 西藏: xiza 新疆: xija

其它国家天气的代码只需将上述代码中的 cncn 换成下列字符串: :

德国:dldl 美国:naus 加拿大:naka 亚洲:asie 欧洲:euro

日本:japn 韩国:skor 朝鲜:nkor

网站想调用一个天气预报的代码,请问哪个网站提供免费代码或是天气插件

我的网站用的代码:://jj.infocom.cn酒嘉市场信息网

这是泰安的天气预报代码,看你需要那种样式

样式一代码:&<iframe src="://.tianqi123/small_page/chengshi_1632.html" width=178 height=248 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url&>&</iframe&>

样式二代码:&<iframe src="://.tianqi123/small_page/chengshi_1632.html?c0=F9DC68&&c1=white&&c2=FEFCE0&&t1=red&&bg=white&&w=178&&text=no" width=178 height=248 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url&>&</iframe&>

样式三滚动代码:&<iframe src="://.tianqi123/small_page/chengshi_1632.html?c0=red&&c1=D96C00&&bg=F4FFF4&&w=178&&h=20&&text=yes" width=178 height=21 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url&>&</iframe&>

天气代码高级使用方法:

如果您会HTML语言,您还可以在iframe代码中的url后面加参数,如:

chengshi_321.html?c0=F9DC68&&c1=white&&c2=FEFCE0&&t1=red&&bg=white&&w=178&&h=250&&text=no

其中 c0 表示 表格第一行背景颜色,c1,c2表示表格其他行间隔的背景颜色,t1表示 标题颜色,bg 表示页面北京颜色,w表示表格宽度 h 表示表格高度

当 text=yes 时,将会出现滚动的天气文字,建议您自己调试看看,如:

chengshi_321.html?c0=red&&c1=FF9900&&bg=F4FFF4&&w=178&&h=20&&text=yes

注意:颜色请不要加 # 符号,如 #FF9900 请写成 FF9900

欢迎访问我的网站

这里的天气预报调用支持DIY样式,并支持IP显示天气,根据用户所在地显示当前天气预报!

://t.xidie/WeatherCode.aspx

样式挺多的。

本文链接:http://www.frpt.cn/tqyb/11813.html
免责声明:文章由网友分享发布,并不意味本站赞同其观点,文章内容仅供参考。此文如侵犯到您的合法权益,请联系我们立刻删除。