no aun asi no me funciona no aparece nada
Código:
<body onload="countDown()">
<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>
<div id="displayDate">
</div>
asi tengo ya todo mi codigo, pero en la pagina no aparece, o alguien me puede decir otro codigo pero que sea por ejemplo asi:
Hoy es (fecha MM/DD/AAAA) y faltan (Dias Hrs/Mins/Segs) para XXXX evento
gracias