Friday, February 20, 2009

JavaScript Codes Change Background

Change Background


<html>


<head>


<script type="text/javascript">


function bgChange(bg)


{


document.body.background=bg


}


</script>


</head>



<body>



<b>Mouse over these images, and the background will
change</b>


<table width="300" height="100">


<tr>


<td onmouseover="bgChange('paper.jpg')"


background="paper.jpg">


</td>


<td onmouseover="bgChange('bluesilk.jpg')"


background="bluesilk.jpg">


</td>


<td onmouseover="bgChange('bgdesert.jpg')"


background="bgdesert.jpg">


</td>


</tr>


</table>



</body>


</html>

No comments: