HTML显示天气预报

我要获取固定城市的天气,它总是给我推了个其他县的天气,这个问题怎么解决?

<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>

image.png

image.png

FineReport yzmweHSy5045669 发布于 2024-3-7 10:14 (编辑于 2024-3-7 10:20)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共4回答
最佳回答
0
ID1208Lv6高级互助
发布于2024-3-7 11:50

固定城市,在后面添加参数&py=chengdu

HTML显示天气预报--https://help.fanruan.com/finereport/doc-view-1820.html?source=4

image.png

最佳回答
0
snrtuemcLv8专家互助
发布于2024-3-7 10:15(编辑于 2024-3-7 10:16)

这个是根据及IP位置显示对应的位置天气

估计你们的IP在变动导致的。。

======

可以用插件,可以设置默认,或者也可以自动

天气图表-https://help.fanruan.com/finereport/doc-view-4162.html

image.png

最佳回答
0
青春只因年少Lv6中级互助
发布于2024-3-7 10:42

<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显示内容

最佳回答
0
gordon-frLv4见习互助
发布于2024-3-7 13:18

这样解决:

<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的参数改为该地方的拼音全拼即可。

如果觉得有用,请慷慨采纳呀!

  • 5关注人数
  • 767浏览人数
  • 最后回答于:2024-3-7 13:18
    请选择关闭问题的原因
    确定 取消
    返回顶部