在flas..

椒江区章安中心小学 >> 艺术天地 >> 在flash里边显示时间的代码

在flash里边显示时间的代码

网站:[椒江区章安中心小学] 来源:[原创] 编辑:[] 日期:[2008-12-10]

在flash里边显示时间的代码
创建一个动态文本框,变量值为:riqi
_root.onEnterFrame = function() {//需要让影片不停执行下面脚本。
todaydate = new Date();
currentyear = todaydate.getFullYear();
currentmonth = todaydate.getMonth()+1;
currentday = todaydate.getDate();
cday = todaydate.getDay();
if (cday==1) cday="星期一";
if (cday==2) cday="星期二";
if (cday==3) cday="星期三";
if (cday==4) cday="星期四";
if (cday==5) cday="星期五";
if (cday==6) cday="星期六";
if (cday==0) cday="星期日";
mytime=new Date()
t_h=mytime.getHours()
if(t_h<10){ 
shi="0" + t_h
}else{ 
shi=t_h 
t_m=mytime.getMinutes()
if(t_m<10){ 
fen="0" + t_m
}else{ 
fen=t_m 
t_s=mytime.getSeconds() 
if(t_s<10){ 
miao="0" + t_s 
}else{ 
miao=t_s 
}
riqi="今天是"+currentyear+"."+currentmonth+"."+currentday+"  "+shi+":"+fen+":"+miao;
}
 
设为首页 加入收藏 联系我们 学校简介 学校历史 论坛 博客 RSS
访问统计:load... IP 在线人数:load...
版权所有@椒江区章安中心小学 2007-2008
办公室:0576-88999857,校长室:0576-88998157,书记室:0576-88990157
信息产业部ICP证:浙ICP 000000号 台州铭博科技有限公司维护