我要获取固定城市的天气,它总是给我推了个其他县的天气,这个问题怎么解决?
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=1&city=青岛" frameborder="0" width="400" height="24" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no"></iframe>
固定城市,在后面添加参数&py=chengdu
HTML显示天气预报--https://help.fanruan.com/finereport/doc-view-1820.html?source=4
这个是根据及IP位置显示对应的位置天气
估计你们的IP在变动导致的。。
======
可以用插件,可以设置默认,或者也可以自动
天气图表-https://help.fanruan.com/finereport/doc-view-4162.html
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=1" width="330" height="35" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>使
表格使用HTML显示内容
这样解决:
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=1&py=qingdao" frameborder="0" width="400" height="24" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no"></iframe>
需要显示什么地方的天气,就把 py的参数改为该地方的拼音全拼即可。
如果觉得有用,请慷慨采纳呀!