i want to change the background due to the temp,but it didn’t work.
this is the code
function changeBackgroundImage(){
var fah=document.getElementById("temp").innerHTML;
fah = parseInt(fah);
if(fah > -10 && fah <= 0){
document.body.style.backgroundImage='url(img/rain.jpg)';
}else if(fah > 1 && fah <= 15){
document.body.style.backgroundImage="url(img/rain.jpg)";
}else if(fah > 16 && fah <= 30){
document.body.style.backgroundImage="url(img/sun.jpg)";
}else if(fah > 31){
document.body.style.backgroundImage="url('https://images.pexels.com/photos/66997/pexels-photo-66997.jpeg?auto=compress&cs=tinysrgb&h=350')";
};
}