标题:求助:动态中文时间显示,做出了中文显示,动态弄不来,哪位大侠帮帮忙
只看楼主
噬魂夜
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-8-9
 问题点数:0 回复次数:0 
求助:动态中文时间显示,做出了中文显示,动态弄不来,哪位大侠帮帮忙
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="JavaScript" type="text/javascript"> function number(today){ var numberstring="一二三四五六七八九十"; if(today==0){ document.write("十") } if(today<10){ document.write(numberstring.substring((today-1),today)) } else if(today<20){ document.write("十"+numberstring.substring((today-11),(today-10))) } else if(today<30){ document.write("二十"+numberstring.substring((today-21),(today-20))) } else if(today<40){ document.write("三十"+numberstring.substring((today-31),(today-30))) } else if(today<50){ document.write("四十"+numberstring.substring((today-41),(today-40))) } else { document.write("五十"+numberstring.substring((today-51),(today-50))) } } function time(){ var mydate=new Date() var year=mydate.getYear() var month=mydate.getMonth()+1 var date=mydate.getDate() var day=mydate.getDay() var hours=mydate.getHours() var minutes=mydate.getMinutes() var seconds=mydate.getSeconds() document.write("公元二零零五年") number(month) document.write("月") number(date) document.write("日") number(hours) document.write("点") number(minutes) document.write("分") number(seconds) document.write("秒") setTimeout( 'time()', 1000) } </script> </head> <body onLoad="time()"> </body> </html>

[此贴子已经被作者于2005-8-9 21:03:16编辑过]

搜索更多相关主题的帖子: javascript function content number 中文 
2005-08-09 20:59



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-24760-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.086987 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved