在Dreamweaver中怎么设置天气预报

在Dreamweaver中怎么设置天气预报连接(可以切换中国各个县城的天气预报)?
!!!!!!!!!!!

Dreamweaver中设置天气预报,需要插入属下代码:

<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

插入天气预报,效果如下:

温馨提示:答案为网友推荐,仅供参考
第1个回答  推荐于2021-01-29
Dreamveaver中没有这个功能吧?你是说使用它做网页时,在网页上加上天气预报版面的吧?需要加一些脚本来实现的,有朋友给了一些代码了,直接加在自己需要显示的位置就可以了。

<iframe src="http://m.weather.com.cn/m/p1/weather1.htm?id=101301010T width="自定义" height="自定义" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>

我这段就是一个县的天气预报,你可以自己换成自己所在城市的。好用呀!
http://www.weather.com.cn/static/html/weather_cj.shtml#这个网页可以复制得到上面的代码的。
参考资料: http://www.weather.com.cn/static/html/weather_cj.shtml#
第2个回答  2008-12-02
Dreamveaver中没有这个功能吧?你是说使用它做网页时,在网页上加上天气预报版面的吧?需要加一些脚本来实现的,楼上就有些朋友给了一些代码了,直接加在自己需要显示的位置就可以了。

<iframe src="http://m.weather.com.cn/m/p1/weather1.htm?id=101301010T width="自定义" height="自定义" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>

我这段就是一个县的天气预报,你可以自己换成自己所在城市的。好用呀!
http://www.weather.com.cn/static/html/weather_cj.shtml#这个网页可以复制得到上面的代码的。

参考资料:http://www.weather.com.cn/static/html/weather_cj.shtml#

本回答被网友采纳
第3个回答  2008-12-02
<iframe src=http://weather.china.com.cn/city/54945_cn1.html width=211 marginwidth=0 height=23 marginheight=0 scrolling=no frameborder=0 id=city_frame_cn border=0 framespacing=0 ></iframe>

其中的54945 是我的城市的代码。
如果你不知道如何查找你自己城市的代码。我可以帮你查。
这是 中国互联网新闻中心 提供的天气预报数据。准确性没得说,广告痕迹也不明显。
第4个回答  2008-12-02
其实很简单,使用一个通用的JS,无非调用大网站的数据,放到你的网页里面去就可以了。
相似回答