BabyHome
寶寶首頁
寶寶相簿
筆記本
寶寶日記
留言版


會員登入
加入會員
BabyHome 首頁

 

 

 


╭。☆ 三隻小豬的KITTY世界 ☆。╮
 
位置--> 筆記本╭。☆ 網頁製作分享區 ☆。╮ ╭。☆女寶寶年齡框 ☆。╮

喜歡的媽咪
可直接複製語法帶回
不會用的媽咪
可至留言板告知我
我再幫你製作




 三種粉嫩年齡框語法2008-05-02 Page:1/1

(1)
<!--年齡框包含計算語法_開始-->
<table border="0" cellspacing="0" cellpadding="0" id="table4">
<tr> <td width="82"><img SRC="http://xs216.xs.to/xs216/07231/baby_6.gif" WIDTH="82" BORDER="0" HEIGHT="75"></td>
<td style="BACKGROUND: url(http://xs216.xs.to/xs216/07231/baby_7.gif)" height=75 cellSpacing=0 cellPadding=0 width=223 border=0 height="75" width="223" ><form><center>
<span style="FONT-SIZE:11pt;COLOR:#8CBDF2;FONT-FAMILY:Comic Sans MS;Times New Roman"><br>
<script language="JavaScript">
var today = new Date();
var year = today.getYear();
var month = today.getMonth();
var day = today.getDate();
var t_yy = 0;
var t_mm = 0;
var t_dd = 0;

var b_yy = 寶貝出生西元年;
var b_mm = 月份兩位數例:1月=01;
var b_dd = 日期兩位數例:4日=04;

t_yy = year - b_yy - 1;

if ( month + 1 > b_mm)
{ t_mm = month - b_mm ;
t_yy++;
}
else
t_mm = 12 - b_mm + month;

if (day > b_dd)
{ t_dd = day - b_dd;
t_mm++;
}
else
t_dd = daysInMonth(month, year) - b_dd + day;

if (t_dd > daysInMonth(month, year)-1)
{ t_dd = 0;
t_mm++;
}

if (t_mm > 11)
{ t_mm = 0;
t_yy++;
}

document.write("寶貝");

if (t_yy > 0)
document.write(" " + t_yy + " 歲 ");

if (t_mm > 0)
document.write(t_mm + " 個月");

if (t_dd > 0)
document.write(" 又 " + t_dd + " 天囉 ") ;

//****** function set ******

function arrayOfDayInMonths(isLeapYear)
{ this[0] = 31;
this[1] = 28;
if (isLeapYear)
this[1] = 29;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}

function daysInMonth(month, year)
{ var isLeapYear = ((( year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0));
var monthdays = new arrayOfDayInMonths(isLeapYear);
return monthdays[month];
}
</script></span></center>
</td>
</tr>
</table>
<!--年齡框包含計算語法_結束-->

(2)
<!--年齡框包含計算語法_開始--> <table border="0" cellspacing="0" cellpadding="0" id="table4">
<tr> <td width="82"><img SRC="http://xs216.xs.to/xs216/07231/baby_1.gif" WIDTH="82" BORDER="0" HEIGHT="75"></td>
<td style="BACKGROUND: url(http://xs216.xs.to/xs216/07231/baby_3.gif)" height=75 cellSpacing=0 cellPadding=0 width=223 border=0><form><center>
<span style="FONT-SIZE:11pt;COLOR:#FF4646;FONT-FAMILY:Comic Sans MS;Times New Roman"><BR>
<script language="JavaScript">
var today = new Date();
var year = today.getYear();
var month = today.getMonth();
var day = today.getDate();
var t_yy = 0;
var t_mm = 0;
var t_dd = 0;

var b_yy = 寶貝出生西元年;
var b_mm = 月份兩位數例:1月=01;
var b_dd = 日期兩位數例:4日=04;

t_yy = year - b_yy - 1;

if ( month + 1 > b_mm)
{ t_mm = month - b_mm ;
t_yy++;
}
else
t_mm = 12 - b_mm + month;

if (day > b_dd)
{ t_dd = day - b_dd;
t_mm++;
}
else
t_dd = daysInMonth(month, year) - b_dd + day;

if (t_dd > daysInMonth(month, year)-1)
{ t_dd = 0;
t_mm++;
}

if (t_mm > 11)
{ t_mm = 0;
t_yy++;
}

document.write("寶貝");

if (t_yy > 0)
document.write(" " + t_yy + " 歲 ");

if (t_mm > 0)
document.write(t_mm + " 個月");

if (t_dd > 0)
document.write(" 又 " + t_dd + " 天囉 ") ;

//****** function set ******

function arrayOfDayInMonths(isLeapYear)
{ this[0] = 31;
this[1] = 28;
if (isLeapYear)
this[1] = 29;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}

function daysInMonth(month, year)
{ var isLeapYear = ((( year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0));
var monthdays = new arrayOfDayInMonths(isLeapYear);
return monthdays[month];
}
</script></span></center>

</td>
</tr>
</table>
<!--年齡框包含計算語法_結束-->


(3)
<!--年齡框包含計算語法_開始--> <table border="0" cellspacing="0" cellpadding="0" id="table4">
<tr> <td width="82"><img SRC="http://xs216.xs.to/xs216/07231/baby_4.gif" WIDTH="82" BORDER="0" HEIGHT="75"></td>
<td style="BACKGROUND: url(http://xs216.xs.to/xs216/07231/baby_5.gif)" height=75 cellSpacing=0 cellPadding=0 width=223 border=0><form><center>
<span style="FONT-SIZE:11pt;COLOR:#A7EE6C;FONT-FAMILY:Comic Sans MS;Times New Roman"><BR>
<script language="JavaScript">
var today = new Date();
var year = today.getYear();
var month = today.getMonth();
var day = today.getDate();
var t_yy = 0;
var t_mm = 0;
var t_dd = 0;

var b_yy = 寶貝出生西元年;
var b_mm = 月份兩位數例:1月=01;
var b_dd = 日期兩位數例:4日=04;

t_yy = year - b_yy - 1;

if ( month + 1 > b_mm)
{ t_mm = month - b_mm ;
t_yy++;
}
else
t_mm = 12 - b_mm + month;

if (day > b_dd)
{ t_dd = day - b_dd;
t_mm++;
}
else
t_dd = daysInMonth(month, year) - b_dd + day;

if (t_dd > daysInMonth(month, year)-1)
{ t_dd = 0;
t_mm++;
}

if (t_mm > 11)
{ t_mm = 0;
t_yy++;
}

document.write("寶貝");

if (t_yy > 0)
document.write(" " + t_yy + " 歲 ");

if (t_mm > 0)
document.write(t_mm + " 個月");

if (t_dd > 0)
document.write(" 又 " + t_dd + " 天囉 ") ;

//****** function set ******

function arrayOfDayInMonths(isLeapYear)
{ this[0] = 31;
this[1] = 28;
if (isLeapYear)
this[1] = 29;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}

function daysInMonth(month, year)
{ var isLeapYear = ((( year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0));
var monthdays = new arrayOfDayInMonths(isLeapYear);
return monthdays[month];
}
</script></span></center>

</td>
</tr>
</table>
<!--年齡框包含計算語法_結束--> 



Copyright 2024, BabyHome  | 隱私權政策