@@ -78,7 +78,7 @@ weatherForecast.onload = function () {
78
78
const day1 = weekday [ dayWeek ] ; console . log ( `day1 is ${ day1 } ` ) ;
79
79
let day2 , day3 ;
80
80
document . getElementById ( 'r1c1' ) . innerText = day1 ;
81
- document . getElementById ( 'r1c3' ) . innerText = Math . round ( fObj . list [ 0 ] . main . temp ) + "°" ;
81
+ document . getElementById ( 'r1c3' ) . innerHTML = Math . round ( fObj . list [ 0 ] . main . temp ) + "°" ; // innterHTML required to render deg!
82
82
document . getElementById ( 'r1c2' ) . src = "https://openweathermap.org/img/w/" + fObj . list [ 0 ] . weather [ 0 ] . icon + ".png" ;
83
83
document . getElementById ( 'r1c2' ) . alt = fObj . list [ 0 ] . weather [ 0 ] . description ;
84
84
document . getElementById ( 'r1c2' ) . title = fObj . list [ 0 ] . weather [ 0 ] . main ;
@@ -91,7 +91,7 @@ weatherForecast.onload = function () {
91
91
}
92
92
console . log ( `day2 is ${ day2 } ` ) ;
93
93
document . getElementById ( 'r2c1' ) . innerText = day2 ;
94
- document . getElementById ( 'r2c3' ) . innerText = Math . round ( fObj . list [ 8 ] . main . temp ) + "°" ;
94
+ document . getElementById ( 'r2c3' ) . innerHTML = Math . round ( fObj . list [ 8 ] . main . temp ) + "°" ;
95
95
document . getElementById ( 'r2c2' ) . src = "https://openweathermap.org/img/w/" + fObj . list [ 8 ] . weather [ 0 ] . icon + ".png" ;
96
96
document . getElementById ( 'r2c2' ) . alt = fObj . list [ 8 ] . weather [ 0 ] . description ;
97
97
document . getElementById ( 'r2c2' ) . title = fObj . list [ 8 ] . weather [ 0 ] . main ;
@@ -105,7 +105,7 @@ weatherForecast.onload = function () {
105
105
day3 = weekday [ dayWeek + 2 ] ;
106
106
}
107
107
console . log ( `day3 is ${ day3 } ` ) ;
108
- document . getElementById ( 'r3c1' ) . innerHTML = day3 ;
108
+ document . getElementById ( 'r3c1' ) . innerText = day3 ;
109
109
document . getElementById ( 'r3c3' ) . innerHTML = Math . round ( fObj . list [ 16 ] . main . temp ) + "°" ;
110
110
document . getElementById ( 'r3c2' ) . src = "https://openweathermap.org/img/w/" + fObj . list [ 16 ] . weather [ 0 ] . icon + ".png" ;
111
111
document . getElementById ( 'r3c2' ) . alt = fObj . list [ 16 ] . weather [ 0 ] . description ;
0 commit comments