好吧,我没有数据集 - 但是 - 获取 JSON 数据的 url 在浏览器中打开它,只需将其发布在窗口中即可。
我这样做了,这是我得到的一个片段(没有阅读该网站的文档)
{"cod":"200","message":0.3729,"city":{"id":1851632,"name":"Shuzenji","coord":{"lon":138.933334,"lat":34.966671 },"country":"JP","population":0},"cnt":41,"list":[{"dt":1394992800,"main":{"temp":-6.78,"temp_min" :-6.78,"temp_max":-6.78,"压力":935.65,"sea_level":1036.67,"grnd_level":935.65,"湿度":73,"temp_kf":0},"天气":[{"id ":800,"main":"Clear","description":"天空晴朗","icon":"01n"}],"clouds":{"all":0},"wind":{"速度":0.71,"度":128.005},"系统":{"pod":"n"},"dt_txt":"2014-03-16 18:00:00"},{"dt":1395003600,"main":{"temp":-8.05,"temp_min":- 8.05,"temp_max":-8.05,"压力":936.88,"sea_level":1038.77,"grnd_level":936.88,"湿度":72,"temp_kf":0},"天气":[{"id": 800,"main":"Clear","description":"天空晴朗","icon":"01n"}],"clouds":{"all":0},"wind":{"speed" :0.61,"deg":175.004},"sys":{"pod":"n"},"dt_txt":"2014-03-16 21:00:00"},{"dt":1395014400,"主要的”:{"temp":-8.05,"temp_min":-8.05,"temp_max":-8.05,"pressure":936.88,"sea_level":1038.77,"grnd_level":936.88,"湿度":72,"temp_kf": 0},"weather":[{"id":800,"main":"Clear","description":"天空晴朗","icon":"01n"}],"clouds":{"all ":0},"wind":{"speed":0.61,"deg":175.004},"sys":{"pod":"n"},"dt_txt":"2014-03-16 21:00 :00"},{"dt":1395014400,"main":{"temp":-8.05,"temp_min":-8.05,"temp_max":-8.05,"pressure":936.88,"sea_level":1038.77,"grnd_level":936.88,"湿度":72,"temp_kf": 0},"weather":[{"id":800,"main":"Clear","description":"天空晴朗","icon":"01n"}],"clouds":{"all ":0},"wind":{"speed":0.61,"deg":175.004},"sys":{"pod":"n"},"dt_txt":"2014-03-16 21:00 :00"},{"dt":1395014400,"main":[{"id":800,"main":"Clear","description":"天空晴朗","icon":"01n"}],"clouds":{"all":0},"wind ":{"speed":0.61,"deg":175.004},"sys":{"pod":"n"},"dt_txt":"2014-03-16 21:00:00"},{" dt":1395014400,"主要":[{"id":800,"main":"Clear","description":"天空晴朗","icon":"01n"}],"clouds":{"all":0},"wind ":{"speed":0.61,"deg":175.004},"sys":{"pod":"n"},"dt_txt":"2014-03-16 21:00:00"},{" dt":1395014400,"主要":
我搜索并搜寻并使用名为人眼的 Mark 1 搜索引擎找到了日期参考。
在那里我找到了变量 dt_txt 'dt_txt":"2014-03-16 18:00:00"。
然后,您可以访问该数组中的数据。日期 javascript 函数和数组访问是在线记录的,我不会重复它们,这是搜索您可以找到的示例。
我花了不到 3 分钟的时间,发现每一行数据都标有日期时间标签。