Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/03/2011, 23:30
Avatar de rafinho85
rafinho85
 
Fecha de Ingreso: octubre-2010
Ubicación: [Location not Found]
Mensajes: 15
Antigüedad: 13 años, 6 meses
Puntos: 0
Pregunta No aparece fecha/hora ni cuenta regresiva!

hola amigos que tal, mi problema es el siguiente, en mi pagina decidi ponerle hora y fecha y cuenta regresiva, pero resulta que no me aparece nada y he revisado el codigo mil veces nose que podra ser, a continuacion les dejo el codigo para que me ayuden a encontrar mi error, de antemano muchas gracias

Código:
<script type="text/javascript">
<!--hide from old browsers
function countDown() {
	var today = new Date()
	var dayofweek = today.toLocaleString()
	dayLocate = dayofweek.indexOf(" ")
	weekDay = dayofweek.substring(0, dayLocate)
	newDay = dayofweek.substring(dayLocate)
	dateLocate = newDay.indexOf(",")
	monthDate = newDay.substring(0, dateLocate+1)
	yearLocate = dayofweek.indexOf("2011")
	year = dayofweek.substr(yearLocate, 4)

	var EarthDay = new Date("April 22, 2011")
	var daysToGo = EarthDay.getTime()-today.getTime()
	var daysToEarthDay = Math.ceil(daysToGo/(1000*60*60*24))

	displayDate.innerHTML = "<h3>Today is "+weekDay+" "+monthDate+" "+year+". We have "+daysToEarthDay+" days until Earth Day.</h3>
}
-->
</script>