㈠ 求天气预报代码
我的网站用的代码:http://jj.infocom.cn酒嘉市场信息网
这是泰安的天气预报代码,看你需要那种样式
样式一代码:<iframe src="http://www.tianqi123.com/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="http://www.tianqi123.com/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="http://www.tianqi123.com/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
欢迎访问我的网站
㈡ 天气预报代码
根据IP地址,显示当地的天气预报:
<iframe src="http://www.tianqi123.com/php/current_city.php" width=178 height=248 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center id=url></iframe>
第二个:265的.
<iframe src=http://www.cms52.cn/cms/20080301/"http://weather.265.com/weather.htm" width="168" height="54" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no">
</iframe>
第三个:腾讯QQ的:
<iframe SRC='http://weather.qq.com/inc/ss258.htm' id='ifm2' WIDTH='189' HEIGHT='190' ALIGN='CENTER' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO'></iframe>
第四个:还是腾讯QQ的:
<iframe SRC=http://www.cms52.cn/cms/20080301/"http://weather.qq.com/24.htm" id='ifm1' WIDTH='405' HEIGHT='332' ALIGN='center' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO'></iframe>
再送你一款QQ电台的调用,蛮小巧的:
<IFRAME marginWidth=0 marginHeight=0 src=http://www.cms52.cn/cms/20080301/"http://listen.qq.com/cj/player.htm" frameBorder=0 width=255 scrolling=no height=30></IFRAME>
㈢ c# winform 如何显示天气预报
不要听网上这些人的风言风语,我们都是用WebBrowser来完成这个操作的,直接把url赋值给WebBrowser就了事,何必一大堆一大堆的代码,天气预报终究是运营商提供的,哪天他停止了服务,你又要去修改代码,不觉得可笑吗?
我的方法是:建立一个本地ACCESS数据库,设置好他的密码,在里面做一个表,存储各个城市url和各个城市名,url是在网站上获取的,比如:http://tianqi.xixik.com,提供你所需要的城市天气预报代码:http://cache.xixik.com.cn/1/hefei/是合肥的http://cache.xixik.com.cn/1/beijing/是北京的...
你要做的事情很简单,只需要读取数据库,给WebBrowser分配url就好了,数据库放在程序相对路径里面,可以增删查,防止这个网站没用了还可以维护,打包程序的时候把数据库格式改成.bat或者.cab,连接字符串里,也要改掉,这样数据库就只占几个KB空间。
㈣ c语言 输入一个月及每日气温(含有1位小数),程序输出该月平均,最高和最底气温
#include<stdio.h>
int main()
{
int days;
float sum,max,min,temp;
max=sum=0.0;
min=100.0;
printf("请输入当月的天数:");
scanf("%d",&days);
for(int i=0;i<days;i++)
{
printf("请输入%d日的气温:",i+1);
scanf("%f",&temp);
sum+=temp;
max=max<temp?temp:max;
min=min>temp?temp:min;
}
printf("当月最高气温:%.1f\n",max);
printf("当月最低气温:%.1f\n",min);
printf("当月平均气温:%.1f\n",sum/days);
return 0;
}
㈤ 如何用C语言获取天气预报
可以使用第三方http库,调用天气预报网站的相关api来获取数据
当然如果你对http熟悉的话,也可以用socket自己实现
㈥ 求天气预报网站代码(有要求)
<iframe
src="http://m.weather.com.cn/m/p6/weather1.htm"
width="220"
height="30"
marginwidth="0"
marginheight="0"
hspace="0"
vspace="0"
frameborder="0"
scrolling="No"></iframe>
上面这段代码显示的是访问这个网站的人所在城市的天气情况。
如果需要设置城市的话可以访问这个网址:
http://www.tianqi123.com/main/small_page.html?url=http://www.tianqi123.com/tianqi/chengshi_1.html&city_name=北京
根据需要输入城市名称,生成你想要的代码
㈦ 课设求救,用C语言做天气预报
进行c语言网络编程? 从网上获取天气预报信息? 关键是网上天气预报有相应的接口没,怎么获取,然后你处理一下结果就差不多了。
㈧ 可选择城市的天气预报代码
<center><p><b>天 气 预 报</b></cenier>
<center><iframe width=157 height=240 frameborder=0 scrolling=NO src='http://appnews.qq.com/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
㈨ 聊城天气预报的代码
天气预报的源代码:(多种样式) 1,多功能式天气预报源代码: <IFRAME ID='ifm2' WIDTH='189' HEIGHT='190' ALIGN='CENTER' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' SRC='http://weather.qq.com/inc/ss125.htm'></IFRAME> 2,横框式天气预报源代码: <form action="http://www.t7online.com/cgi-bin/suchen" method="GET" target="_top"> <font face="宋体" size="2" color="#ff0000"><b>输入城市名称</b><br></font> <input type="text" size="10" maxlength=20 name="ORT"><input type="hidden" name="LANG" value="cn"> <input type="submit" value="查询天气"></form> 3,QQ气象源代码: <iframe src="http://weather.265.com/weather.htm" width="160" height="54" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> 4,可以同时出现四个城市的天气情况的源代码: <iframe width="145" height="130" border="0" align="center" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://minisite.qq.com/Weather/news_new.html" allowTransparency="true"></iframe> 5,只能出现一个城市天气情况的源代码: <IFRAME id=ifm2 align=center marginWidth=0 marginHeight=0 src="http://weather.qq.com/inc/ss125.htm" frameBorder=0 width=189 scrolling=no height=190></IFRAME><DIV></DIV> 具体操作步骤是: 点击控制面板——个人首页维护——自定义空白面板——新增——钩选“显示源代码”前的小方框(出现钩号,同时文档里出现DIV的字样)——复制粘贴上面任何一组代码——再次钩选“显示源代码”前的小方框(钩号消失)——保存——返回自定义设置——定制我的首页——添加模块——勾选新增面板——保存设置就行了; 改变默认城市的步骤: 1,拖动该图片,让它独自在一个新的网页出现; 2,查找你要的城市的天气预报,然后复制其网址; 3,把复制的网址粘贴到原来的网址上;
㈩ 单一城市的天气预报代码怎么写越简单越好
//给你一个网址
//http://m.weather.com.cn/data/101010100.html
//http://blog.csdn.net/hello_haozi/article/details/7564223
NSString *shangHai = @"http://m.weather.com.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:NSJSONReadingMutableLeaves error:&error];
NSLog(@"%@",shangHaiDict);
}
}];
这是上海的天气 ,不知道是否回答了你的问题