Understanding how to change the background color is easier than it seems. All you have to do is this:
<a href="#" onclick="document.bgColor = 'red'">Change to red</a>
this will change the background color of the WHOLE page when the user clicks on the link. You could also use CSS if you are planning to change the background color of tables, text fragments, etc.
<a href="#" onclick="document.myTable.style.backgroundColor='red'">Change the table background Color to red</a>
this will change the background color of a table with the name "myTable" when the user clicks the link.
Please don't doubt to answer this post since I know how it feels when you want to do something and it seems to be impossible... hehe