Change Background Color

Change Background Color

<html>
<head>
<script>
function bgChange(bg)
{
document.body.style.background=bg;
}
</script>
</head>
<body>
<b>Mouse over the squares and the background color will change!</b><table width=”300″ height=”100″>

<tr>

<td onmouseover=”bgChange(‘red’)” onmouseout=”bgChange(‘transparent’)” bgcolor=”red”></td>

<td onmouseout=”bgChange(‘transparent’)” bgcolor=”blue”></td>

<td onmouseover=”bgChange(‘green’)” onmouseout=”bgChange(‘transparent’)” bgcolor=”green”> </td>

</tr>

</table>

</body>

</html>

Mouse over the squares and the background color will change!