This works perfect for me:
<html>
<head>
<title>Test</title>
<style type="text/css">
table.background {background:blue;}
p {
color: green;
}
</style>
<script type="text/javascript">
function change(id) {
document.getElementById("background").style.backgroundColor = "white";
document.getElementById("fonter").style.color = "black";
document.getElementById("fontes").style.color = "black";
}
function changeb(id) {
document.getElementById("background").style.backgroundColor = "black";
document.getElementById("fontes").style.color = "white";
document.getElementById("fonter").style.color = "white";
}
</script>
<body>
<table id="background" class="background">
<tr>
<td><br/><input type="radio" name="styling" onclick="change();"><p id="fonter">White Background</p></td>
<td><br/><input type="radio" name="styling" onclick="changeb();"><p id="fontes">Black Background</p></td>
</td>
</tr>
</table>
</body>
</html>
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
Offline 59 posts
since Jul 2010