阅读703 返回首页    go 阿里云 go 技术社区[云栖]


怎么在网站中插入天气预报

在网站插入天气预报:如下效果:

 


需要插入属下代码,链接到“中国天气”网:

<iframe src="https://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>

需要其他城市的天气的时,就替换101190901这个字符串。

比如搜索到南京,看见url是这样:https://www.weather.com.cn/weather/101190101.shtml

只要把需要城市后面的数字字符串替换原来那个字符串即可!

最后更新:2017-04-02 06:52:24

  上一篇:go java之httpclient点点补充-登录问题
  下一篇:go Java控制台程序如何在用户关闭时执行清理代码