It is quite simple to change the background color of the webpage according to the days of a week. You can do this by using a series of ifs. The code is as follows, but it only works in Internet Explorer.
<script language=”javascript”>
var mydate=new Date();
var today=mydate.getDay();
if (today==0){document.write(‘Today is Sunday’);document.write (‘<body style=”background-color: pink”>’)};
else if (today==1){document.write(‘Today is Monday’);document.write (‘<body style=”background-color: blue”>’)};
else if (today==2){document.write(‘Today is Tuesday’);document.write (‘<body style=”background-color: red”>’)};
else if (today==3){ document.write(‘Today is Wednesday’);document.write (‘<body style=”background-color: green”>’)};
else if (today==4){document.write(‘Today is Thursday’);document.write (‘<body style=”background-color: yellow”>’)};
else if (today==5){document.write(‘Today is Friday’);document.write (‘<body style=”background-color: orange”>’)};
else if(today==6){document.write(‘Today is Saturday’);document.write (‘<body style=”background-color: cyan”>’)};
</script>