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>