时间代码视听语言(求时间日期html代码,带农历!(高手进))

本文目录
求时间日期html代码,带农历!(高手进)
下面代码可以实现你要的功能,如下。至于你看不到它的真实的源代码,它可能通过程序动态加载,或者是js调用。你看到的,仅仅是静态的html代码而已!
《html》
《head》
***隐藏网址***
《title》单行带农历的日期时间代码《/title》
《/head》
《body》
《SCRIPT language=JavaScript》
《!--
function CalConv()
{
FIRSTYEAR = 1998;
LASTYEAR = 2031;
today = new Date();
SolarYear = today.getFullYear();
SolarMonth = today.getMonth() + 1;
SolarDate = today.getDate();
Weekday = today.getDay();
LunarCal = [
new tagLunarCal( 27, 5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ),
new tagLunarCal( 46, 0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ),
new tagLunarCal( 35, 0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ),
new tagLunarCal( 23, 4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
new tagLunarCal( 42, 0, 1, 4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
new tagLunarCal( 31, 0, 2, 9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),
new tagLunarCal( 21, 2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),
new tagLunarCal( 39, 0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),
new tagLunarCal( 28, 7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),
new tagLunarCal( 48, 0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),
new tagLunarCal( 37, 0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ),
new tagLunarCal( 25, 5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
new tagLunarCal( 44, 0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
new tagLunarCal( 33, 0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
new tagLunarCal( 22, 4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),
new tagLunarCal( 40, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),
new tagLunarCal( 30, 9, 2, 7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
new tagLunarCal( 49, 0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),
new tagLunarCal( 38, 0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ),
new tagLunarCal( 27, 6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),
new tagLunarCal( 46, 0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),
new tagLunarCal( 35, 0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),
new tagLunarCal( 24, 4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
new tagLunarCal( 42, 0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),
new tagLunarCal( 31, 0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),
new tagLunarCal( 21, 2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
new tagLunarCal( 40, 0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ),
new tagLunarCal( 28, 6, 2, 5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),
new tagLunarCal( 47, 0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),
new tagLunarCal( 36, 0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),
new tagLunarCal( 25, 5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),
new tagLunarCal( 43, 0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),
new tagLunarCal( 32, 0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),
new tagLunarCal( 22, 3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];
SolarCal = ;
SolarDays = ;
if ( SolarYear 《= FIRSTYEAR || SolarYear 》 LASTYEAR ) return 1;
sm = SolarMonth - 1;
if ( sm 《 0 || sm 》 11 ) return 2;
leap = GetLeap( SolarYear );
if ( sm == 1 )
d = leap + 28;
else
d = SolarCal;
if ( SolarDate 《 1 || SolarDate 》 d ) return 3;
y = SolarYear - FIRSTYEAR;
acc = SolarDays + SolarDate;
kc = acc + LunarCal.BaseKanChih;
Kan = kc % 10;
Chih = kc % 12;
Age = kc % 60;
if ( Age 《 22 )
Age = 22 - Age;
else
Age = 82 - Age;
if ( acc 《= LunarCal.BaseDays ) {
y--;
LunarYear = SolarYear - 1;
leap = GetLeap( LunarYear );
sm += 12;
acc = SolarDays + SolarDate;
}
else
LunarYear = SolarYear;
l1 = LunarCal.BaseDays;
for ( i=0; i《13; i++ ) {
l2 = l1 + LunarCal + 29;
if ( acc 《= l2 ) break;
l1 = l2;
}
LunarMonth = i + 1;
LunarDate = acc - l1;
im = LunarCal.Intercalation;
if ( im != 0 && LunarMonth 》 im ) {
LunarMonth--;
if ( LunarMonth == im ) LunarMonth = -im;
}
if ( LunarMonth 》 12 ) LunarMonth -= 12;
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i《this.length;i++)
this }
var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
document.write("", today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日 ",d,"");
months = ;
days = ;
document.write( " 农历"+months + "");
return 0;
}
function GetLeap( year )
{
if ( year % 400 == 0 )
return 1;
else if ( year % 100 == 0 )
return 0;
else if ( year % 4 == 0 )
return 1;
else
return 0;
}
function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) {
this.BaseDays = d;
this.Intercalation = i;
this.BaseWeekday = w;
this.BaseKanChih = k;
this.MonthDays = ;
}
//--》
《/SCRIPT》
***隐藏网址***
《/body》
《/html》
北京时间 Flash代码
唔,我是不知道要怎么放进YY内,(是说YY语音聊天工具?) 不过我可以给你得到时间的flash代码。
var date:Date = new Date(); //Date类就是flash里的时间类
trace(date.getHours()); //输出小时值,下面的方法都是Date用来得到本地时间的方法,只要你是在中国用,那就是北京时间。用法都是如此。
getDate() 得到几号(1 到 31 之间的一个整数)。
getDay() 得到星期几(0 代表星期日,1 代表星期一,依此类推)。
getFullYear() 得到年份(一个 4 位数,如 2011)。
getHours() 得到时值(0 到 23 之间的一个整数)。
getMilliseconds() 得到毫秒值(0 到 999 之间的一个整数)。
getMinutes() 得到分钟值(0 到 59 之间的一个整数)部分。
getMonth() 得到月份值(0 代表一月,1 代表二月,依此类推)部分。
getSeconds() 得到秒值(0 到 59 之间的一个整数)部分。
求一个时间html代码 格式:年月日时分秒(可以动)
《script language=JavaScript》
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;}
function startclock () {
stopclock();
showtime();}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" +((hours 》= 12) ? "下午 " : "上午 " )
timeValue += ((hours 》12) ? hours -12 :hours)
timeValue += ((minutes 《 10) ? ":0" : ":") + minutes
timeValue += ((seconds 《 10) ? ":0" : ":") + seconds
document.clock.thetime.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;}
《/SCRIPT》
《body onload=startclock()》
《form name=clock 》
《input name=thetime style="font-size: 9pt;color:#000000;border:0" size=12》
《/body》

更多文章:
织梦php版本(织梦后台添加文章时,提示标题不能为空,但是,标题、内容和分类都是填好的,是DedeCMS-V5.7-GBK-SP1版本)
2025年6月21日 23:00
form在信封上是什么意思(在信封上面写From与To分别代表哪个英文是收件人,哪个英文是发件人急!先谢谢!)
2026年9月13日 19:30
readprocessmemory资源消耗(readprocessmemory问题)
2026年8月10日 21:00
essentials插件(minecraft 怎么安装Essentials插件)
2026年3月27日 00:45
s11全球总决赛集锦(edg晋级s11决赛(夺取冠军之路))
2026年8月17日 09:00
keyset(Set keys=Map.keyset()怎么理解)
2025年10月20日 14:00
js注册成功跳转页面代码(如何使用JavaScript实现 按钮跳转页面功能)
2026年7月24日 02:45
securities(有关securities, stock, shares, bonds的概念~)
2025年7月8日 15:45
export trade(export trade是什么意思)
2026年5月26日 10:00
css鼠标悬停背景颜色变化(用css样式怎样实现鼠标放在背景图片上,背景图片的颜色改变)
2026年3月17日 16:30
sql中connect的用法(C#中,用SqlConnection怎么连接数据库)
2026年9月2日 22:45
account短语用法(On no account can是什么意思)
2026年5月2日 17:30









