宝宝成长计时代码 

作者:丫呗爸爸  日期:2007-10-25


在pjblog后台模块添加,原代码

<div align="center">
<script language=javascript>
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments }
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write(
"<font style='font-size:9pt;font-family: 宋体'>今天是",
today.getFullYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日",
d[today.getDay()+1],
"</font>" );
</script>
</div>


<div align="center">
<script language="JavaScript" type="text/javascript">
<!--
now = new Date()
nowyear=now.getFullYear()
if(nowyear<2000)
nowyear=nowyear+1900
nowmonth=now.getMonth()+1
nowdate=now.getDate()
years=nowyear-2004                 //2004改成宝宝生日那年 例如改成 2006
months=nowmonth-08               //08改成宝宝生日那月      例如改成 02
dates=nowdate-16                    //16改成宝宝生日那天       例如改成 14
if((years<0)||((years==0)&&(months<0))||((years==0)&&(months==0)&&(dates<=0)))
document.write("<span><font color=red>你的系统时钟好像不太对哦!</font></span>")
else {
if(dates<0) {
months=months-1
dates=dates+30
}
if(months<0) {
years=years-1
months=months+12
}
document.write("<span>丫呗已经")         //丫呗改成宝宝名字 例如改成 小鱼儿
if (years>0) {
document.write(years)
document.write("岁")
}
if(months>0) {
document.write(months)
document.write("个月")
}
if(((years>0)||(months>0))&&(dates>0))
document.write("零")
if(dates>0) {
document.write(dates)
document.write("天")
}
else
document.write("整")
document.write("啦</span>")
if((months==0)&&(dates==0)) {
document.write("<span>!<font color=red><b>丫呗生日快乐!") //丫呗改成宝宝名字
document.write("</b></font></span>")
}
}
//-->
</script></div>
                
<p align="center"><font color="#6B6B36">(<SCRIPT LANGUAGE="JavaScript">    
<!--    
var urodz = new Date("August 16,2004"); //August 16,2004 改成宝宝出生那天 例如February 14,2006 情人节那天生的
var now = new Date();    
var ile = now.getTime() - urodz.getTime();    
var dni = Math.floor(ile / (1000 * 60 * 60 * 24));    
if (dni > 0)    
   document.write("<font color=ff6500><b>" + dni + "</b></font>days")    
else    
    document.write("This will happen in future");    
// --></SCRIPT>)


[本日志由 丫呗爸爸 于 2008-06-23 11:34 PM 编辑]
上一篇: 停电之后
下一篇: 给丫呗做个南瓜头
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: 博客
相关日志:
评论: 43 | 引用: 0 | 查看次数: -



Winston[2023-09-11 02:21 PM | | Mail To:winstonbrett@hotmail.it | 154.16.20.97 | del | 回复回复]
43#
[/IMAGE]
Annette[2023-09-09 08:29 AM | | Mail To:annettebruner@aol.com | 5.75.226.237 | del | 回复回复]
42#
%%
Lucas[2023-09-07 03:16 PM | | Mail To:lucas_ramer@facebook.com | 192.210.201.26 | del | 回复回复]
41#
[/IMAGE]
Augustus[2023-09-05 08:50 AM | | Mail To:augustusstarling@yahoo.com | 5.75.226.237 | del | 回复回复]
40#
%%
Corine[2023-08-29 08:50 AM | | Mail To:corinesmithies@hotmail.co.uk | 184.174.58.146 | del | 回复回复]
39#
Definitely awesome, hats off!
Beryl[2023-08-24 07:09 PM | | Mail To:berylsams@gmail.com | 45.95.39.209 | del | 回复回复]
38#
Awesome post.
Bettie[2023-08-23 06:58 AM | | Mail To:bettiefouch@hotmail.com | 154.16.20.91 | del | 回复回复]
37#
[/IMAGE]
Andre[2023-08-11 11:08 AM | | Mail To:andrelombard@cox.net | 183.221.221.149 | del | 回复回复]
36#
%%
Jacob[2023-08-02 04:12 AM | | Mail To:jacob.brink@msn.com | 46.29.250.56 | del | 回复回复]
35#
[/IMAGE]
Shelia[2023-07-30 10:38 PM | | Mail To:sheliakay@yahoo.com | 216.162.199.33 | del | 回复回复]
34#
Yeah bookmaking this wasn't a speculative decision outstanding post!
Sherry[2023-05-31 03:06 PM | | Mail To:sherrykrebs@hotmail.it | 194.5.82.79 | del | 回复回复]
33#
%%
Deandre[2023-05-21 11:21 AM | | Mail To:deandre.gallardo@yahoo.de | 216.74.118.210 | del | 回复回复]
32#
I like this blog so much, saved to fav.
Desiree[2023-05-19 04:34 PM | | Mail To:desireebieber@gmail.com | 139.28.223.62 | del | 回复回复]
31#
[/IMAGE]
Julia[2023-05-18 04:34 AM | | Mail To:julia.holden@gmail.com | 192.210.201.26 | del | 回复回复]
30#
Awesome post.
Shelia[2023-05-04 02:58 AM | | Mail To:shelia_wyselaskie@bigstring.com | 192.210.201.26 | del | 回复回复]
29#
Awesome post.
Mamie[2023-05-01 12:23 AM | | Mail To:mamiekuhn@web.de | 139.28.223.62 | del | 回复回复]
28#
[/IMAGE]
Claudette[2023-02-16 07:27 PM | | Mail To:claudettegrimes@aol.com | 139.99.60.143 | del | 回复回复]
27#
เก็บตกภาพบนกุฏิ สักกันชุดสุดท้าย ปิดท้ายตอน 2 ทุ่ม ได้กันไปคนละนิด ...
Thurman[2023-02-15 00:48 AM | | Mail To:thurmanjenyns@freenet.de | 139.99.60.143 | del | 回复回复]
26#
ร่วมแจมครับ ขอผมเนื้อทองแดง ขอเมตตาจากพระอาจารย์พันธ์ จารด้านหน้าให้ครับ....
Enriqueta[2023-02-13 11:35 PM | | Mail To:enriquetafowles@yahoo.com | 139.99.60.143 | del | 回复回复]
25#
อย่างท่านเอ็กซ์ ถ้ากลัวก็คงไม่เต็มทั้งหน้าทั้งหลังเลยใช่ไหมครับ ...
Adam[2023-02-05 00:12 AM | | Mail To:adamfortner@hotmail.com | 139.99.60.143 | del | 回复回复]
24#
จุฬาฯ แจงดราม่า ‘อุโมงค์น้ำ’ อีกรอบ รับให้ ‘โตโน่’ ใช้ฟรี ชี้มีเหตุผลยกเว้นเ...




发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 邮件地址支持Gravatar头像,邮箱地址不会公开.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 100 字 | UBB代码 关闭 | [img]标签 关闭