3boys2girls » Xanga及網誌 » 日記覆數+日期分類 » 親手改成!中文既生日倒數:)

2008-9-28 09:59 傻吉.姍v3v;
親手改成!中文既生日倒數:)

生日倒數見得多
都有好多人用過
咁中文既你用過未牙?
以下系我自己改既中文生日倒數
吾用都比個CM我喇
<!---CODE BY XANGA USER SAI_BOZI--->
</tr><script language="JavaScript1.2">
var today = new Date;
var Future0 = new Date;
var BirthMonth = [color=red]生日月份[/color];
var BirthDate = [color=red]生日日期[/color];
var BirthYear = [color=red]生日年份[/color];
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=#BF80FF><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=#[color=darkorchid]9F40FF[/color]> ", age ,ageend," </font>歲生日喇");
else if (daysleftint == 1)
document.write("聽日系我<font color=#[color=darkorchid]0000FF[/color]> ", age, ageend, " </font> 歲生日啊=)");
else if (today1 == future1)
document.write("我既<font color=#[color=darkorchid]FF0000[/color]> ", age, ageend, " </font> 歲生日就系今日喇:D");
else
document.write("passed");
</script><br>
<!---CODE BY XANGA USER SAI_BOZI--->
[color=darkorchid]紫色既部分可改成自己鐘意既顏色[/color]

2008-9-28 10:49 傻吉.姍v3v;
留個cm喇-_-

2008-9-28 12:46 黃容
THz You

2008-9-28 18:01 yandytai
點將D字變大隻D?

2008-9-28 18:12 傻吉.姍v3v;
[quote]原帖由 [i]yandytai[/i] 於 2008-9-28 18:01 發表 [url=http://www01.3boys2girls.com/redirect.php?goto=findpost&pid=26588212&ptid=411641][img]http://www01.3boys2girls.com/images/common/back.gif[/img][/url]
點將D字變大隻D? [/quote]
<!---CODE BY XANGA USER SAI_BOZI--->
</tr><script language="JavaScript1.2">
var today = new Date;
var Future0 = new Date;
var BirthMonth = 月份;
var BirthDate = 日期;
var BirthYear = 年份;
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=#BF80FF><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("<FONT size=[color=red]6[/color]>仲有 ", daysleftint, " 日我就 <font color=#9F40FF> ", age ,ageend," </font>歲生日喇</FONT>");
else if (daysleftint == 1)
document.write("<FONT size=[color=red]6[/color]>聽日系我<font color=#0000FF> ", age, ageend, " </font> 歲生日啊=)</FONT>");
else if (today1 == future1)
document.write("<FONT size=[color=red]6[/color]>我既<font color=#FF0000> ", age, ageend, " </font> 歲生日就系今日喇:D</FONT>");
else
document.write("passed");
</script><br>
<!---CODE BY XANGA USER SAI_BOZI--->
改紅色既部分,1-7

[[i] 本帖最後由 傻吉.姍v3v; 於 2008-9-28 18:23 編輯 [/i]]

2008-9-28 18:15 姿:D
唔該哂`^3^

2008-9-28 21:07 `_YEE
THZ你丫..
用了..

2008-10-1 10:14 傻吉.姍v3v;
^W^

2008-10-1 14:17 ..※.小楊..↗
好難改嫁咩-,-?

2008-10-2 21:45 傻K貓
0K啦~
唔錯~
唔錯~
^^

2008-10-4 21:03 伊芙蓮:)
THz

2008-10-5 14:01 穎CcCc=]
我用左啦=)
thx=]

2008-10-5 18:47 小彤`-]
用佐.thz

2008-10-5 20:41 tsangj211
點樣改生日既歲數?

2008-10-6 11:40 c晶=]`[email protected][]@
SUP`<3
我用吾到-v-'

2008-10-7 16:50 WaYnE恆
THX啊..太正啦^^

2008-10-7 17:47 細粒飯
借左`
thx`

2008-10-10 19:36 《小愛×`菇
有無倒數相反個啲:)?

2008-10-11 17:31 [衰妹]
放係邊架?!

2008-10-13 23:16 小妍:]
好令:D 借佐;thz*v*

2008-10-14 23:02 傻吉.姍v3v;
[quote]原帖由 [i][衰妹][/i] 於 2008-10-11 05:31 PM 發表 [url=http://www01.3boys2girls.com/redirect.php?goto=findpost&pid=27271816&ptid=411641][img]http://www01.3boys2girls.com/images/common/back.gif[/img][/url]
放係邊架?! [/quote]
HEADER PLZ-)

2008-10-18 16:47 帥魚-0-
thxQ -}

2008-10-22 14:02 ah`anNa
sup `

2008-10-24 20:20 lem0n`檸檬(;
supp0rt`

頁: [1] 2 3 4


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.