Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/12/2012, 07:49
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Semaforo Script

puedes mostrar y ocultar las imágenes o cambiar el src de una sola imagen
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CARATULAS DE PELÍCULAS</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
border: none;
position: relative;
}

html, body {
width: 100%;
height: 100%;
}


#bloque {
display: block;
width: 100%;
min-height: 100%;
height: auto !important;
background-color: green;
}
</style>
<script type="text/javascript">

var arrcolor = ['green', 'yellow', 'red'];
var counter = 1;
function semaforo() {
document.getElementById('bloque').style.background Color = arrcolor[counter % arrcolor.length];
counter++;
}

</script>
</head>
<body>

<div id="bloque">

</div>

<button onclick="semaforo()">cambiar semaforo</button>

</body>
</html>
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}