网页中实现一个计算当年还剩多少时间的倒数计时程序,要求网页上实时动态显示“××年还剩××天××时××分××秒”...
functioncounter(){vardate=newDate();varyear=date.getFullYear();vardate2=newDate(year,12,31,23,59,59);vartime=(date2-date)/1000;varday=Math.floor(time/(24*60*60))varhour=Math.floor(time%(24*60*60)/(60*