Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/03/2016, 16:59
mafagre
 
Fecha de Ingreso: mayo-2011
Mensajes: 4
Antigüedad: 13 años
Puntos: 0
Mostrar Imagen en cero segundos

Hola tengo un problema, como puedo hacer para que cuando el segundero llegue a cero junto con el se muestre una imagen.

Comparto el codigo
Código:
<html> 
<head> 
<title>Documento</title> 

</head> 

<body bgcolor="#FFFFFF">

<table width="600" border="0">
  <tr>
    <td height="580">
    <p><img src="img/imagen.jpg" width="40" height="40"></p></td>
    <td>
    <div id="seg" class="seg">
    <div id="contador"></div>
    </div>
</td>
  </tr>
</table>
<script>
//Cuenta atrás en javascript
tiempo = 59; // Tiempo de inicialización para la cuenta atrás
 
tiempoAux=tiempo;
function cuenta_atras()
{
     document.getElementById("contador").innerHTML = tiempoAux+'</b> '; //Muestro los segundos que faltan
     tiempoAux--;
     if(tiempoAux == -1)
     {
          tiempoAux=tiempo;
     }
}
inter=setInterval("cuenta_atras()", 1000); // Ejecuto la acción cada segundo
</script>

</body> 
</html>