<Script Language="JavaScript"> var timedate= new Date("January 1,2011"); var now = new Date(); var date = timedate.getTime() - now.getTime(); var time = Math.floor(date / (1000 * 60 * 60 * 24)); if (time >= 0) ; document.write("现在离2011年1月1日还有: "+time +"天"); </Script>