I think that would either have to be coded server side (in case the page is not served with only HTML but is inserted with PHP for example) or if you want an approach on the user’s end, you could go with window.localStorage and check the last time the page was visited – if that was more than a day ago, then change the background.
Hii, I have given you the code (JavaScript), try it yourself and share the result
var i = 0;
function change() {
var doc = document.getElementById(“background”);
var color = [“black”, “blue”, “brown”, “green”];
doc.style.backgroundColor = color[i];
i = (i + 1) % color.length;
}
setInterval(change, 1000);