var countdownwidth='500px' var countdownheight='20px' var countdownbgcolor='#ffffff' var opentags='' var closetags='... Read more: http://nethoabinh.com/showthread.php?t=1924#ixzz196WlFU[r]
(1)Code_Dem_Nguoc_Thoi_Gian_noel_nam_moi_sinh_nhat <html> <head> <title>Code_Dem_Nguoc_Thoi_Gian_noel_nam_moi_sinh_nhat</title> <body> <TD vAlign=top> <DIV class=text style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-TOP: 2px"> <DIV align=left> <center><SCRIPT language=JavaScript1.2> function setcountdown(theyear,themonth,theday){ yr=theyear;mo=themonth;da=theday } //nethoabinh.com //email: info@123doc.org //phone: 0988 410 459 //Y!m: hoctrorongchoi //////////Chinh sua cau hinh tai day////////////////// //STEP 1: Chinh sua mau tu den han tai dong duoi theo form: Nam,Thang,Ngay setcountdown(2010,12,25) //STEP 2: Thay doi khau hieu cho phu hop voi website cua ban var occasion="<FONT COLOR=RED>Giáng Sinh Năm 2010</FONT>" var message_on_occasion="<FONT COLOR=RED>Chúc mừng giáng sinh 2010</FONT>" //STEP 3: Chinh sua mau sac, chieu rong, dai var countdownwidth='500px' var countdownheight='20px' var countdownbgcolor='#ffffff' var opentags='<font face="Verdana"><b><large>' var closetags='</large></b</font>' //////////////Khong thay doi nhung dong duoi day neu nhu khong hieu ve code////////////// var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov", "Dec") var crosscount='' function start_countdown(){ if (document.layers) document.countdownnsmain.visibility="show" else if (document.all||document.getElementById) crosscount=document.getElementById&&!document.all? document.getElementById("countdownie") : countdownie countdown() } if (document.all||document.getElementById) document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>') window.onload=start_countdown function countdown(){ var today=new Date() (2) var todayy=today.getYear() if (todayy < 1000) todayy+=1900 var todaym=today.getMonth() var todayd=today.getDate() var todayh=today.getHours() var todaymin=today.getMinutes() var todaysec=today.getSeconds() var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec futurestring=montharray[mo-1]+" "+da+", "+yr dd=Date.parse(futurestring)-Date.parse(todaystring) dday=Math.floor(dd/(60*60*1000*24)*1) dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1) dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1) //if on day of occasion if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){ if (document.layers){ document.countdownnsmain.document.countdownnssub.document.write(opentags +message_on_occasion+closetags) document.countdownnsmain.document.countdownnssub.document.close() } else if (document.all||document.getElementById) crosscount.innerHTML=opentags+message_on_occasion+closetags return } //if passed day of occasion else if (dsec<=-5){ if (document.layers){ document.countdownnsmain.document.countdownnssub.document.write(opentags +"Occasion already passed! "+closetags) document.countdownnsmain.document.countdownnssub.document.close() } else if (document.all||document.getElementById) crosscount.innerHTML=opentags+"Giáng sinh năm 2010"+closetags //Thay doi khau hieu return } //else, if not yet else{ if (document.layers){ document.countdownnsmain.document.countdownnssub.document.write(opentags +"C̣ n, "+dday+ " ngày, "+dhour+" giờ, "+dmin+" phút, và "+dsec+" giây là đến "+occasion+closetags) document.countdownnsmain.document.countdownnssub.document.close() } else if (document.all||document.getElementById) crosscount.innerHTML=opentags+dday+ " ngày, "+dhour+"h, "+dmin+" phút, và "+dsec+" giây là đến "+occasion+closetags } setTimeout("countdown()",1000) } </SCRIPT> </body></html> (3) Read more: http://nethoabinh.com/showthread.php?t=1924#ixzz196WlFU9T Read more: http://nethoabinh.com/showthread.php?t=1924#ixzz196YdEuga (4)