如何在网站中插入天气预报
摘要:我们希望在网站插入天气预报:如下效果:需要插入属下代码:那个连接链接到“中国天气”网。需要其他城市的天气的时,就替换...
我们希望在网站插入天气预报:如下效果:
需要插入属下代码:
<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
那么你懂了吧!只要把需要城市后面的数字字符串替换原来那个字符串即可!
【如何在网站中插入天气预报】相关文章:
上一篇:
XML与CSS样式结合
下一篇:
html自适应表格的方法