AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > 网页制作

如何在网站中插入天气预报

51自学网 http://www.wanshiok.com
iframe,url

我们希望在网站插入天气预报:如下效果:

 



需要插入属下代码:

<iframe src="http://www.weather.com.cn/weather/101190801.shtml " width="245" height="110" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>

 

那个连接链接到“中国天气”网。

 

需要其他城市的天气的时,就替换101190801这个字符串。那么我怎么知道什么城市是啥字符串啊?

 

比如我们搜索到上海,看见url是这样:http://www.weather.com.cn/weather/101020100.shtml

 

那么你懂了吧!只要把需要城市后面的数字字符串替换原来那个字符串即可!


iframe,url  
上一篇:html自适应表格的方法  下一篇:XML与CSS样式结合