You are on page 1of 3

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1>


<script LANGUAGE="JavaScript"><!--

///Función de cambio de imagenes al mover el raton sobre ellas

//Imagenes seleccionadas
image1on=new Image();
image1on.src="imagenes/buzon abierto.jpg"
image2on=new Image();
image2on.src="imagenes/cara feliz.gif"
//Imagenes por defecto
image1off=new Image();
image1off.src="imagenes/buzon cerrado.jpg"
image2off=new Image();
image2off.src="imagenes/cara triste.jpg"

function img_act(imgNombre){
imgOn=eval(imgNombre+"on.src")
document[imgNombre].src=imgOn;
}

function img_inact(imgNombre){
imgOff=eval(imgNombre+"off.src"
document[imgNombre].src=imgOff;
}

//Scroll en una ventana,

var txt="ESta es la primera line de texto que se desplaza"


+"y esta es la segunda, puedes poner todas las "
+"que quieras!

function scroll()
{ document.frm.w.value=txt;
txt=txt.substring(1,txt.lenght)+ txt.charAt(0);
windows.setTimeout("scroll()",150);}

//-->

</script>

<title>Ejemplos de JavaScript</title>
</head>

<body onLoad=()bgcolor="#C0C0C0">

<table border="1"width="100%">
<tr>
<td width="100%"bgcolor="008080"><p align="center">Aplicaciones de Java
Script</td>

</tr>
</table>

<p><br>
</p>
<div align="center"><center>

<table border="1"width="82%" height="77">


<tr>

<td width="50%" rowspan="2" height="71"><table border="1" width="32%">


<tr>
<td width="100%" colspan="2" bgcolor="#FFFFFF"><p align="center">Cambio de
imagenes </td>
</tr>
<tr>
<td width="150" align="center" bgcolor"#0000FF"><img src="imagenes/buzon
cerrado.jpg"
name="image1" alt="correo" on MouseOver="img_act("image1")"
on Mouseout="img_inact("image1")" WIDTH="118" HEIGHT="118"></td>

<td width="50%" align="center" bgcolor="#0000FF"><img src="imagenes/cara


triste.jpg"
name="image2" alt="cara" onMouseOver="img_act("image2")"
onMouseout="img_inact(image2")" WIDTH="118" HEIGHT"118"></TD>
</tr>
</table>
</td>
<td width="50%" height="8%" bgcolor="#FFFFFF"><p align="center">Caja de texto
rotativo</td>
</tr>
<tr>
<td width="50%" height="75%" bgcolor="#0000FF"><form NAME="frm">
<p><input TYPE="text" NAME="w" SIZE="45"></p>
</form>
</td>
</tr>
</table>
</center></div>
<div align="center">
<table border="1" width="56%">

<tr>
<td width=100%><p align="center"><a href="javascript:windoe.history.back()"><img
src="atras.gif" alt="atras.gif (650 bytes)" align="middle" WIDTH="30"
HEIGHT="30">Volver a la pagina
anterior</a></td>

</tr>
</table>
</div>
</body>
</html>

You might also like