Where did I go wrong?
window.onload = function() { setInterval(showTime, 1000); changeBodyColor(); } function showTime() { var d = new Date(); var hours = d.getHours(); var minutes = d.getMinutes(); var seconds = d.getSeconds(); document.getElementById("time").innerHTML = hours + ":" + minutes + ":" + seconds; } function bbgcolo(){ var s = new Date(); var secs = s.getSeconds(); if(secs % 2 === 0){ document.body.style.backgroundColor.innerHTML = "white"; } else { document.body.style.backgroundColor.innerHTML = "black"; } } I want to change the background color of the page but script isn't working.. Problem solved!! Thanks Thanks Thanks if you had intention of helping me.. But for now, I am closing this case.. If you have better ideas, please share!! https://code.sololearn.com/WcIpzGt2vy6V/?ref=app visit this 👆👆👆