我们希望在网站插入天气预报:如下效果:
<wbr></wbr>
<iframe src="http://m.weather.com.cn/m/pn12/weather.htm?id=101190901T " width="245" height="110" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>
<wbr></wbr>
那个连接链接到“中国天气”网。
<wbr></wbr>
需要其他城市的天气的时,就替换101190901这个字符串。那么我怎么知道什么城市是啥字符串啊?
<wbr></wbr>
比如我们搜索到南京,看见url是这样:http://www.weather.com.cn/weather/101190101.shtml
<wbr></wbr>
那么你懂了吧!只要把需要城市后面的数字字符串替换原来那个字符串即可!