Ejemplos en Javascript

Cambia imagen de fondo

<HTML>
<HEAD>

<TITLE>Ejemplos Javascript: ejemplo pr???¡ctico </TITLE>

<style>
/*Background previewer credit: Website Abstraction (www.wsabstract.com) More scripts here*/
.bgimages img {cursor:hand; border:2 solid red}
</style>
<script language="JavaScript1.2">
<!--
function tile(){
if (!document.all)
return
var source=event.srcElement
if (source.tagName=="IMG")
document.body.style.backgroundImage="url("+source.src+")"
}
//-->
</script>


</HEAD>

<BODY bgcolor="white">

 
<div class="bgimages" onClick="tile()">
<img src="sfondo01.jpg" border=0 width=100 height=100 alt="Background 0"> <img src="sfondo02.gif" width=100 height=100 alt="Background 2" border="0"> <img src="sfondo03.jpg" width=100 height=100 alt="Background 3" border="0"> <img src="sfondo04.jpg" width=100 height=100 alt="Background 4" border="0">
</div>



</body>
</html>

Background y fondo