Thời gian

Cafe nhé !

Tra từ điển online


Tra theo từ điển:



Sắp xếp dữ liệu

Liên kết Website

Thống kê

  • truy cập   (chi tiết)
    trong hôm nay
  • lượt xem
    trong hôm nay
  • thành viên
  • Thành viên trực tuyến

    1 khách và 0 thành viên

    Gốc > Chia sẻ code blog >

    Code chúc mừng năm mới 3

     

    <center><embed src="http://d.violet.vn/uploads/resources/603/tan_mao_2011.swf" width="510" height="180" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="never"><!-- dem_nguoc -->

    <br>

    <center><font color="blue" size="4.5"><i><script type="text/javascript">

    function setcountdown(theyear,themonth,theday){

    yr=theyear;mo=themonth;da=theday

    }

    setcountdown(2011,02,03)

    var occasion="Tết Nguyên Đán - Xuân Tân Mão"

    var message_on_occasion="Chào "

     

    var countdownwidth='480px'

    var countdownheight='20px'

    var countdownbgcolor='lightblack'

    var opentags='<font face="Verdana"><small>'

    var closetags='<\/small><\/font>'

    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()

    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 (dday<=-1){

    if (document.layers){

    document.countdownnsmain.document.countdownnssub.document.write(opentags+"Chúc bạn năm mới An Khang - Thịnh Vượng! "+closetags)

    document.countdownnsmain.document.countdownnssub.document.close()

    }

    else if (document.all||document.getElementById)

    crosscount.innerHTML=opentags+"Chúc bạn năm mới An Khang - Thịnh Vượng "+closetags

    return

    }

    //else, if not yet

    else{

    if (document.layers){

    document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags)

    document.countdownnsmain.document.countdownnssub.document.close()

    }

    else if (document.all||document.getElementById)

    crosscount.innerHTML="Còn " +opentags+dday+ " ngày, "+dhour+" Giờ, "+dmin+" Phút "+dsec+" Giây nữa là đến "+occasion+closetags

    }

    setTimeout("countdown()",1000)

    }

    </script><span id="countdownie" style="width:480px; background-color:lightblack">Còn <font face="Verdana"><small>2 ngày, 6 Giờ, 3 Phút 43 Giây nữa là đến Tết Nguyên Đán - Xuân Tân Mão</small></font></span></i></font> <b><br></b></center>

    </center>

       Quý thầy copy code trên và paste vào khối chính. Chúc thầy cô thành công ! 


    Nhắn tin cho tác giả
    Ngô Tấn Lợi @ 19:11 31/01/2011
    Số lượt xem: 551
    Số lượt thích: 0 người
     
    Gửi ý kiến

    Logo liên kết !
    Thư viện của Ngô Tấn Lợi
    Bình Định FFC Diễn đàn Tây Sơn Đất võ Quy Nhơn Online