xanga¥Î~˼ƥͤé¬Jcode~
±z¬O²Ä
927ÓÂsÄýªÌ
<script language="JavaScript1.2">
var today = new Date;
var Future0 = new Date;
var BirthMonth = 8;
var BirthDate = 28;
var BirthYear = 1987;
BirthMonth--;
Future0.setMonth(BirthMonth, BirthDate);
if (Date.parse(today) > Date.parse(Future0))
{
Future0.setFullYear(today.getYear()+1);
age = (today.getYear() - BirthYear) + 1;
}
else
{age = today.getYear() - BirthYear;}
if (age % 10 == 0)
ageend = 'th';
else if (age % 10 == 4)
ageend = 'th';
else if (age % 10 == 5)
ageend = 'th';
else if (age % 10 == 6)
ageend = 'th';
else if (age % 10 == 7)
ageend = 'th';
else if (age % 10 == 8)
ageend = 'th';
else if (age % 10 == 9)
ageend = 'th';
else if (age % 10 == 1)
ageend = 'st';
else if (age % 10 == 2)
ageend = 'nd';
else if (age % 10 == 3)
ageend = 'rd';
var faraevent = "<font color=#FF80BF><i>my birthday</font>";
today1 = Date.parse(today);
future1 = Date.parse(Future0);
secleft = future1 - today1;
miliday = 24 * 60 * 60 * 1000;
daysleft = secleft/miliday;
daysleftint = Math.round(daysleft);
if (daysleftint > 1)
document.write(" ", daysleftint, " <font color=#FF80BF>days until my ", age, ageend, " birthday</font>");
else if (daysleftint == 1)
document.write("<font color=#FF80BF>my <b>", age, ageend, "</b> birthday is</font> tomorrow");
else if (today1 == future1)
document.write("<font color=#FF80BF>my <b>", age, ageend, "</b> birthday is</font> today");
else
document.write("passed");
</script>
liÓ§Ú³£¥Îºò..¨ä¹êø¤@©wcount b day..count¨ä¥L«n¤é¤l³£±o~§ï¤Ucode´Nok°Õ...
¦³µµ¦â¬J¦a¤èn§ï~¦]¬°ÓÓ«Y§Ú¬J¥Í¤é
ÂŦâ¬J¥i§ï¥iø§ï~¥Î¾¤show §A·Qdisplay¬JÓ¥y¥y¤l..
eg..¦pªG§Aø§ï§A·|¼g "xxdays until my xx birthday"
¯»¬õ¦â¬J²¦â
©ñ«YHeader (own header html)
[ ¥»©«³Ì«á¥Ñ yyyeung_0828 ©ó 2007-8-6 08:58 ½s¿è ]
¹ê¥Î¬ÛÃö·j´M: ua av it ysl rf