很不错的农历代码

这个是在安全焦点上找到的,一个牛人写的,很不错的!

嘿嘿!今天在baidu上也发现了这个东西,只不过功能更强劲一点罢了,都是一样的!

百渡 的万年历的查询居然连结的也是一样的,嘿嘿!演示地址为:

http://www.xichang.tv/calendar.htm

源代码如下:

  1<html><head><title>农历与西历对照</title>
  2<meta content="农历; 阳历; 月历; 节日; 时区; 节气; 八字; 干支; 生肖; gregorian solar; chinese lunar; calendar;" name="keywords"/>
  3<meta content="All" name="robots"/>
  4<meta content="gregorian solar calendar and chinese lunar calendar" name="description"/>
  5<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  6<script language="JavaScript">   
  7<!--   
  8/*****************************************************************************   
  9日期资料   
 10*****************************************************************************/ 
 11
 12var lunarInfo=new Array(   
 130x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,   
 140x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,   
 150x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,   
 160x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,   
 170x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,   
 180x06ca0,0x0b550,0x15355,0x04da0,0x0a5d0,0x14573,0x052d0,0x0a9a8,0x0e950,0x06aa0,   
 190x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,   
 200x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b5a0,0x195a6,   
 210x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,   
 220x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,   
 230x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,   
 240x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,   
 250x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,   
 260x05aa0,0x076a3,0x096d0,0x04bd7,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,   
 270x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0) 
 28
 29var solarMonth=new Array(31,28,31,30,31,30,31,31,30,31,30,31);   
 30var Gan=new Array("甲","乙","丙","丁","戊","己","庚","辛","壬","癸");   
 31var Zhi=new Array("子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥");   
 32var Animals=new Array("鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪");   
 33var solarTerm = new Array("小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至")   
 34var sTermInfo = new Array(0,21208,42467,63836,85337,107014,128867,150921,173149,195551,218072,240693,263343,285989,308563,331033,353350,375494,397447,419210,440795,462224,483532,504758)   
 35var nStr1 = new Array('日','一','二','三','四','五','六','七','八','九','十')   
 36var nStr2 = new Array('初','十','廿','卅',' ')   
 37var monthName = new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"); 
 38
 39//国历节日 *表示放假日   
 40var sFtv = new Array(   
 41"0101*元旦",   
 42"0214 情人节",   
 43"0308 妇女节",   
 44"0312 植树节",   
 45"0315 消费者权益日",   
 46"0317 St. Patrick's",   
 47"0401 愚人节",   
 48"0501 劳动节",   
 49"0504 青年节",   
 50"0512 护士节",   
 51"0520 文珊生日",   
 52"0601 儿童节",   
 53"0613 坤生日",   
 54"0614 Flag Day",   
 55"0701 建党节 香港回归纪念",   
 56"0801 建军节",   
 57"0808 父亲节",   
 58"0908 茂生日",   
 59"0909 毛泽东逝世纪念",   
 60"0910 教师节",   
 61"0928 孔子诞辰",   
 62"1001*国庆节",   
 63"1006 老人节",   
 64"1011 少珊生日",   
 65"1024 联合国日",   
 66"1111 Veteran's / Remembrance Day",   
 67"1112 孙中山诞辰纪念",   
 68"1220 澳门回归纪念",   
 69"1225 Christmas Day",   
 70"1226 毛泽东诞辰纪念") 
 71
 72//农历节日 *表示放假日   
 73var lFtv = new Array(   
 74"0101*春节",   
 75"0115 元宵节",   
 76"0505 端午节",   
 77"0707 七夕情人节",   
 78"0715 中元节",   
 79"0815 中秋节",   
 80"0909 重阳节",   
 81"1208 腊八节",   
 82"1224 小年",   
 83"0100*除夕") 
 84
 85//某月的第几个星期几   
 86var wFtv = new Array(   
 87"0131 Martin Luther King Day",   
 88"0231 President's Day",   
 89"0520 母亲节",   
 90"0530 Armed Forces Day",   
 91"0531 Victoria Day",   
 92"0716 合作节",   
 93"0730 被奴役国家周",   
 94"0811 Civic Holiday",   
 95"0911 Labor Holiday",   
 96"1021 Columbus Day",   
 97"1144 Thanksgiving") 
 98
 99  
100/*****************************************************************************   
101日期计算   
102*****************************************************************************/ 
103
104//====================================== 传回农历 y年的总天数   
105function lYearDays(y) {   
106var i, sum = 348   
107for(i=0x8000; i>0x8; i>>=1) sum += (lunarInfo[y-1900] & i)? 1: 0   
108return(sum+leapDays(y))   
109} 
110
111//====================================== 传回农历 y年闰月的天数   
112function leapDays(y) {   
113if(leapMonth(y)) return((lunarInfo[y-1900] & 0x10000)? 30: 29)   
114else return(0)   
115} 
116
117//====================================== 传回农历 y年闰哪个月 1-12 , 没闰传回 0   
118function leapMonth(y) {   
119return(lunarInfo[y-1900] & 0xf)   
120} 
121
122//====================================== 传回农历 y年m月的总天数   
123function monthDays(y,m) {   
124return( (lunarInfo[y-1900] & (0x10000>>m))? 30: 29 )   
125} 
126
127//====================================== 算出农历, 传入日期物件, 传回农历日期物件   
128// 该物件属性有 .year .month .day .isLeap .yearCyl .dayCyl .monCyl   
129function Lunar(objDate) { 
130
131var i, leap=0, temp=0   
132var baseDate = new Date(1900,0,31)   
133var offset = (objDate - baseDate)/86400000 
134
135this.dayCyl = offset + 40   
136this.monCyl = 14 
137
138for(i=1900; i<2050 && offset>0; i++) {   
139temp = lYearDays(i)   
140offset -= temp   
141this.monCyl += 12   
142} 
143
144if(offset<0) {   
145offset += temp;   
146i--;   
147this.monCyl -= 12   
148} 
149
150this.year = i   
151this.yearCyl = i-1864 
152
153leap = leapMonth(i) //闰哪个月   
154this.isLeap = false 
155
156for(i=1; i<13 && offset>0; i++) {   
157//闰月   
158if(leap>0 && i==(leap+1) && this.isLeap==false)   
159{ --i; this.isLeap = true; temp = leapDays(this.year); }   
160else   
161{ temp = monthDays(this.year, i); } 
162
163//解除闰月   
164if(this.isLeap==true && i==(leap+1)) this.isLeap = false 
165
166offset -= temp   
167if(this.isLeap == false) this.monCyl ++   
168} 
169
170if(offset==0 && leap>0 && i==leap+1)   
171if(this.isLeap)   
172{ this.isLeap = false; }   
173else   
174{ this.isLeap = true; --i; --this.monCyl;} 
175
176if(offset<0){ offset += temp; --i; --this.monCyl; } 
177
178this.month = i   
179this.day = offset + 1   
180} 
181
182//==============================传回国历 y年某m+1月的天数   
183function solarDays(y,m) {   
184if(m==1)   
185return(((y%4 == 0) && (y%100 != 0) || (y%400 == 0))? 29: 28)   
186else   
187return(solarMonth[m])   
188}   
189//============================== 传入 offset 传回干支, 0=甲子   
190function cyclical(num) {   
191return(Gan[num%10]+Zhi[num%12])   
192} 
193
194//============================== 月历属性   
195function calElement(sYear,sMonth,sDay,week,lYear,lMonth,lDay,isLeap,cYear,cMonth,cDay) { 
196
197this.isToday = false;   
198//国历   
199this.sYear = sYear;   
200this.sMonth = sMonth;   
201this.sDay = sDay;   
202this.week = week;   
203//农历   
204this.lYear = lYear;   
205this.lMonth = lMonth;   
206this.lDay = lDay;   
207this.isLeap = isLeap;   
208//干支   
209this.cYear = cYear;   
210this.cMonth = cMonth;   
211this.cDay = cDay; 
212
213this.color = ''; 
214
215this.lunarFestival = ''; //农历节日   
216this.solarFestival = ''; //国历节日   
217this.solarTerms = ''; //节气 
218
219} 
220
221//===== 某年的第n个节气为几日(从0小寒起算)   
222function sTerm(y,n) {   
223var offDate = new Date( ( 31556925974.7*(y-1900) + sTermInfo[n]*60000 ) + Date.UTC(1900,0,6,2,5) )   
224return(offDate.getUTCDate())   
225} 
226
227//============================== 传回月历物件 (y年,m+1月)   
228function calendar(y,m) { 
229
230var sDObj, lDObj, lY, lM, lD=1, lL, lX=0, tmp1, tmp2   
231var lDPOS = new Array(3)   
232var n = 0   
233var firstLM = 0 
234
235sDObj = new Date(y,m,1) //当月一日日期 
236
237this.length = solarDays(y,m) //国历当月天数   
238this.firstWeek = sDObj.getDay() //国历当月1日星期几 
239
240  
241for(var i=0;i<this.length;i++) { 
242
243if(lD>lX) {   
244sDObj = new Date(y,m,i+1) //当月一日日期   
245lDObj = new Lunar(sDObj) //农历   
246lY = lDObj.year //农历年   
247lM = lDObj.month //农历月   
248lD = lDObj.day //农历日   
249lL = lDObj.isLeap //农历是否闰月   
250lX = lL? leapDays(lY): monthDays(lY,lM) //农历当月最後一天 
251
252if(n==0) firstLM = lM   
253lDPOS[n++] = i-lD+1   
254} 
255
256//sYear,sMonth,sDay,week,   
257//lYear,lMonth,lDay,isLeap,   
258//cYear,cMonth,cDay   
259this[i] = new calElement(y, m+1, i+1, nStr1[(i+this.firstWeek)%7],   
260lY, lM, lD++, lL,   
261cyclical(lDObj.yearCyl) ,cyclical(lDObj.monCyl), cyclical(lDObj.dayCyl++) ) 
262
263  
264if((i+this.firstWeek)%7==0) this[i].color = 'red' //周日颜色   
265if((i+this.firstWeek)%14==13) this[i].color = 'red' //周休二日颜色   
266} 
267
268//节气   
269tmp1=sTerm(y,m*2 )-1   
270tmp2=sTerm(y,m*2+1)-1   
271this[tmp1].solarTerms = solarTerm[m*2]   
272this[tmp2].solarTerms = solarTerm[m*2+1]   
273if(m==3) this[tmp1].color = 'red' //清明颜色 
274
275//国历节日   
276for(i in sFtv)   
277if(sFtv[i].match(/^(d{2})(d{2})([s*])(.+)$/))   
278if(Number(RegExp.$1)==(m+1)) {   
279this[Number(RegExp.$2)-1].solarFestival += RegExp.$4 + ' '   
280if(RegExp.$3=='*') this[Number(RegExp.$2)-1].color = 'red'   
281} 
282
283//月周节日   
284for(i in wFtv)   
285if(wFtv[i].match(/^(d{2})(d)(d)([s*])(.+)$/))   
286if(Number(RegExp.$1)==(m+1)) {   
287tmp1=Number(RegExp.$2)   
288tmp2=Number(RegExp.$3)   
289this[((this.firstWeek>tmp2)?7:0) + 7*(tmp1-1) + tmp2 - this.firstWeek].solarFestival += RegExp.$5 + ' '   
290} 
291
292//农历节日   
293for(i in lFtv)   
294if(lFtv[i].match(/^(d{2})(.{2})([s*])(.+)$/)) {   
295tmp1=Number(RegExp.$1)-firstLM   
296if(tmp1==-11) tmp1=1   
297if(tmp1 >=0 && tmp1<n) {   
298tmp2 = lDPOS[tmp1] + Number(RegExp.$2) -1   
299if( tmp2 >= 0 && tmp2<this.length) {   
300this[tmp2].lunarFestival += RegExp.$4 + ' '   
301if(RegExp.$3=='*') this[tmp2].color = 'red'   
302}   
303}   
304} 
305
306//黑色星期五   
307if((this.firstWeek+12)%7==5)   
308this[12].solarFestival += '黑色星期五 ' 
309
310//今日   
311if(y==tY && m==tM) this[tD-1].isToday = true; 
312
313} 
314
315//====================== 中文日期   
316function cDay(d){   
317var s; 
318
319switch (d) {   
320case 10:   
321s = '初十'; break;   
322case 20:   
323s = '二十'; break;   
324break;   
325case 30:   
326s = '三十'; break;   
327break;   
328default :   
329s = nStr2[Math.floor(d/10)];   
330s += nStr1[d%10];   
331}   
332return(s);   
333} 
334
335/////////////////////////////////////////////////////////////////////////////// 
336
337var cld; 
338
339function drawCld(SY,SM) {   
340var i,sD,s,size;   
341cld = new calendar(SY,SM); 
342
343if(SY>1874 && SY<1909) yDisplay = '光绪' + (((SY-1874)==1)?'元':SY-1874)   
344if(SY>1908 && SY<1912) yDisplay = '宣统' + (((SY-1908)==1)?'元':SY-1908)   
345if(SY>1911 && SY<1950) yDisplay = '民国' + (((SY-1911)==1)?'元':SY-1911)   
346if(SY>1949) yDisplay = '共和国' + (((SY-1949)==1)?'元':SY-1949) 
347
348GZ.innerHTML = yDisplay +'年 农历' + cyclical(SY-1900+36) + '年 &nbsp;&nbsp;【'+Animals[(SY-4)%12]+'】'; 
349
350YMBG.innerHTML = "&nbsp;" + SY + "<BR>&nbsp;" + monthName[SM]; 
351
352  
353for(i=0;i<42;i++) { 
354
355sObj=eval('SD'+ i);   
356lObj=eval('LD'+ i); 
357
358sObj.className = ''; 
359
360sD = i - cld.firstWeek; 
361
362if(sD>-1 && sD<cld.length) { //日期内   
363sObj.innerHTML = sD+1; 
364
365if(cld[sD].isToday) sObj.className = 'todyaColor'; //今日颜色 
366
367sObj.style.color = cld[sD].color; //国定假日颜色 
368
369if(cld[sD].lDay==1) //显示农历月   
370lObj.innerHTML = '<b>'+(cld[sD].isLeap?'闰':'') + cld[sD].lMonth + '月' + (monthDays(cld[sD].lYear,cld[sD].lMonth)==29?'小':'大')+'</b>';   
371else //显示农历日   
372lObj.innerHTML = cDay(cld[sD].lDay); 
373
374s=cld[sD].lunarFestival;   
375if(s.length>0) { //农历节日   
376if(s.length>6) s = s.substr(0, 4)+'…';   
377s = s.fontcolor('red');   
378}   
379else { //国历节日   
380s=cld[sD].solarFestival;   
381if(s.length>0) {   
382size = (s.charCodeAt(0)>0 && s.charCodeAt(0)<128)?8:4;   
383if(s.length>size+2) s = s.substr(0, size)+'…';   
384s = s.fontcolor('blue');   
385}   
386else { //廿四节气   
387s=cld[sD].solarTerms;   
388if(s.length>0) s = s.fontcolor('limegreen');   
389}   
390}   
391if(s.length>0) lObj.innerHTML = s; 
392
393}   
394else { //非日期   
395sObj.innerHTML = '';   
396lObj.innerHTML = '';   
397}   
398}   
399} 
400
401  
402function changeCld() {   
403var y,m;   
404y=CLD.SY.selectedIndex+1900;   
405m=CLD.SM.selectedIndex;   
406drawCld(y,m);   
407} 
408
409function pushBtm(K) {   
410switch (K){ 
411
412case 'YU' :   
413if(CLD.SY.selectedIndex>0) CLD.SY.selectedIndex--;   
414break;   
415case 'YD' :   
416if(CLD.SY.selectedIndex<149) CLD.SY.selectedIndex++;   
417break;   
418case 'MU' :   
419if(CLD.SM.selectedIndex>0) {   
420CLD.SM.selectedIndex--;   
421}   
422else {   
423CLD.SM.selectedIndex=11;   
424if(CLD.SY.selectedIndex>0) CLD.SY.selectedIndex--;   
425}   
426break;   
427case 'MD' :   
428if(CLD.SM.selectedIndex<11) {   
429CLD.SM.selectedIndex++;   
430}   
431else {   
432CLD.SM.selectedIndex=0;   
433if(CLD.SY.selectedIndex<149) CLD.SY.selectedIndex++;   
434}   
435break;   
436default :   
437CLD.SY.selectedIndex=tY-1900;   
438CLD.SM.selectedIndex=tM;   
439}   
440changeCld();   
441} 
442
443var Today = new Date();   
444var tY = Today.getFullYear();   
445var tM = Today.getMonth();   
446var tD = Today.getDate();   
447////////////////////////////////////////////////////////////////////////////// 
448
449var width = "130";   
450var offsetx = 2;   
451var offsety = 16; 
452
453var x = 0;   
454var y = 0;   
455var snow = 0;   
456var sw = 0;   
457var cnt = 0; 
458
459var dStyle;   
460document.onmousemove = mEvn; 
461
462//显示详细日期资料   
463function mOvr(v) {   
464var s,festival;   
465var sObj=eval('SD'+ v);   
466var d=sObj.innerHTML-1; 
467
468//sYear,sMonth,sDay,week,   
469//lYear,lMonth,lDay,isLeap,   
470//cYear,cMonth,cDay 
471
472if(sObj.innerHTML!='') { 
473
474sObj.style.cursor = 's-resize'; 
475
476if(cld[d].solarTerms == '' && cld[d].solarFestival == '' && cld[d].lunarFestival == '')   
477festival = '';   
478else   
479festival = '<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR="#CCFFCC"><TR><TD>'+   
480'<FONT COLOR="#000000" STYLE="font-size:9pt;">'+cld[d].solarTerms + ' ' + cld[d].solarFestival + ' ' + cld[d].lunarFestival+'</FONT></TD>'+   
481'</TR></TABLE>'; 
482
483s= '<TABLE WIDTH="130" BORDER=0 CELLPADDING="2" CELLSPACING=0 BGCOLOR="#000066"><TR><TD>' +   
484'<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD ALIGN="right"><FONT COLOR="#ffffff" STYLE="font-size:9pt;">'+   
485cld[d].sYear+' 年 '+cld[d].sMonth+' 月 '+cld[d].sDay+' 日<br>星期'+cld[d].week+'<br>'+   
486'<font color="violet">农历'+(cld[d].isLeap?'闰 ':' ')+cld[d].lMonth+' 月 '+cld[d].lDay+' 日</font><br>'+   
487'<font color="yellow">'+cld[d].cYear+'年 '+cld[d].cMonth+'月 '+cld[d].cDay + '日</font>'+   
488'</FONT></TD></TR></TABLE>'+ festival +'</TD></TR></TABLE>'; 
489
490  
491document.all["detail"].innerHTML = s; 
492
493if (snow == 0) {   
494dStyle.left = x+offsetx-(width/2);   
495dStyle.top = y+offsety;   
496dStyle.visibility = "visible";   
497snow = 1;   
498}   
499}   
500} 
501
502//清除详细日期资料   
503function mOut() {   
504if ( cnt >= 1 ) { sw = 0 }   
505if ( sw == 0 ) { snow = 0; dStyle.visibility = "hidden";}   
506else cnt++;   
507} 
508
509//取得位置   
510function mEvn() {   
511x=event.x;   
512y=event.y;   
513if (document.body.scrollLeft)   
514{x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}   
515if (snow){   
516dStyle.left = x+offsetx-(width/2)   
517dStyle.top = y+offsety   
518}   
519} 
520
521/////////////////////////////////////////////////////////////////////////// 
522
523function changeTZ() {   
524CITY.innerHTML = CLD.TZ.value.substr(6)   
525setCookie("TZ",CLD.TZ.selectedIndex)   
526} 
527
528function tick() {   
529var today   
530today = new Date()   
531Clock.innerHTML = today.toLocaleString().replace(/(年|月)/g, "/").replace(/日/, "");   
532Clock.innerHTML = TimeAdd(today.toGMTString(), CLD.TZ.value)   
533window.setTimeout("tick()", 1000);   
534} 
535
536function setCookie(name, value) {   
537var today = new Date()   
538var expires = new Date()   
539expires.setTime(today.getTime() + 1000*60*60*24*365)   
540document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString()   
541} 
542
543function getCookie(Name) {   
544var search = Name + "="   
545if(document.cookie.length > 0) {   
546offset = document.cookie.indexOf(search)   
547if(offset != -1) {   
548offset += search.length   
549end = document.cookie.indexOf(";", offset)   
550if(end == -1) end = document.cookie.length   
551return unescape(document.cookie.substring(offset, end))   
552}   
553else return ""   
554}   
555} 
556
557///////////////////////////////////////////////////////// 
558
559function initial() {   
560dStyle = detail.style;   
561CLD.SY.selectedIndex=tY-1900;   
562CLD.SM.selectedIndex=tM;   
563drawCld(tY,tM); 
564
565CLD.TZ.selectedIndex=getCookie("TZ");   
566changeTZ();   
567tick();   
568} 
569
570//-->   
571</script>
572<script language="VBScript">   
573<!--   
574'===== 算世界时间   
575Function TimeAdd(UTC,T)   
576Dim PlusMinus, DST, y   
577If Left(T,1)="-" Then PlusMinus = -1 Else PlusMinus = 1   
578UTC=Right(UTC,Len(UTC)-5)   
579UTC=Left(UTC,Len(UTC)-4)   
580y = Year(UTC)   
581TimeAdd=DateAdd("n", (Cint(Mid(T,2,2))*60 + Cint(Mid(T,4,2))) * PlusMinus, UTC)   
582'美国日光节约期间: 4月第一个星日00:00 至 10月最後一个星期日00:00   
583If Mid(T,6,1)="*" And DateSerial(y,4,(9 - Weekday(DateSerial(y,4,1)) mod 7) ) <= TimeAdd And DateSerial(y,10,31 - Weekday(DateSerial(y,10,31))) >= TimeAdd Then   
584TimeAdd=CStr(DateAdd("h", 1, TimeAdd))   
585tSave.innerHTML = "R"   
586Else   
587tSave.innerHTML = ""   
588End If   
589TimeAdd = CStr(TimeAdd)   
590End Function   
591'-->   
592</script>
593<style>.todyaColor {   
594BACKGROUND-COLOR: aqua   
595}   
596body,td,th {   
597font-family: Arial, Helvetica, sans-serif;   
598}   
599body {   
600background-color: #C2E9FE;   
601}   
602</style>
603<meta content="Microsoft FrontPage 4.0" name="GENERATOR"/></head>
604<body onload="initial()">
605<script language="JavaScript"><!--   
606if(navigator.appName == "Netscape" || parseInt(navigator.appVersion) < 4)   
607document.write("<h1>你的浏览器无法执行此程序。</h1>此程序在 IE4 以后的版本才能执行!!")   
608//--></script>
609<div id="detail" style="POSITION: absolute"></div>
610<center>
611<form name="CLD">
612<table>
613<tbody>
614<tr>
615<td align="middle" valign="top"><br/><font align="center" color="#000080" face="Arial" id="Clock" size="4"></font>
616<p><!--时区 *表示自动调整为日光节约时间--><font size="2" style="FONT-SIZE: 9pt"><select name="TZ" onchange="changeTZ()" style="FONT-SIZE: 9pt"> <option selected="" value="-1200 安尼威土克、瓜甲兰">国际换日线<option value="-1100 中途岛、萨摩亚群岛">萨摩亚<option value="-1000 夏威夷">夏威夷<option value="-0900*阿拉斯加">阿拉斯加<option value="-0800*太平洋时间(美加)、提亚纳">太平洋<option value="-0700 亚历桑那">美国山区<option value="-0700*山区时间(美加)">美加山区<option value="-0600*萨克其万(加拿大)">加拿大中部<option value="-0600*墨西哥市、塔克西卡帕">墨西哥<option value="-0600*中部时间(美加)">美加中部<option value="-0500*波哥大、里玛">南美洲太平洋<option value="-0500*东部时间(美加)">美加东部<option value="-0500*印第安纳(东部)">美东<option value="-0400*加拉卡斯、拉帕兹">南美洲西部<option value="-0400*大西洋时间 加拿大)">大西洋<option value="-0330 新岛(加拿大东岸)">纽芬兰<option value="-0300 波西尼亚">东南美洲<option value="-0300 布鲁诺斯爱丽斯、乔治城">南美洲东部<option value="-0200*大西洋中部">大西洋中部<option value="-0100*亚速尔群岛、维德角群岛">亚速尔<option value="+0000 格林威治时间、都柏林、爱丁堡、伦敦">英国夏令<option value="+0000 莫洛维亚(赖比瑞亚)、卡萨布兰卡">格林威治标准<option value="+0100 巴黎、马德里">罗马<option value="+0100 布拉格, 华沙, 布达佩斯">中欧<option value="+0100 柏林、斯德哥尔摩、罗马、伯恩、布鲁赛尔、维也纳">西欧<option value="+0200 以色列">以色列<option value="+0200*东欧">东欧<option value="+0200*开罗">埃及<option value="+0200*雅典、赫尔辛基、伊斯坦堡">GFT<option value="+0200*赫拉雷、皮托里">南非<option value="+0300*巴格达、科威特、奈洛比(肯亚)、里雅德(沙乌地)">沙乌地阿拉伯<option value="+0300*莫斯科、圣彼得堡、贺占、窝瓦格瑞德">俄罗斯<option value="+0330*德黑兰">伊朗<option value="+0400*阿布达比(东阿拉伯)、莫斯凯、塔布理斯(乔治亚共和)">阿拉伯<option value="+0430*喀布尔">阿富汗<option value="+0500 伊斯兰马巴德、克洛奇、伊卡特林堡、塔须肯">西亚<option value="+0530 孟买、加尔各答、马垂斯、新德里、可伦坡">印度<option value="+0600 阿马提、达卡">中亚<option value="+0700 曼谷、亚加达、胡志明市">曼谷<option value="+0800 北京、重庆、黑龙江">中国<option value="+0800 台湾、香港、新加坡">台北<option value="+0900 东京、大阪、扎幌、汉城、亚库兹(东西伯利亚)">东京<option value="+0930 达尔文">澳洲中部<option value="+1000 布里斯本、墨尔本、席德尼">席德尼<option value="+1000 霍巴特">塔斯梅尼亚<option value="+1000 关岛、莫斯比港、海 威">西太平洋<option value="+1100*马哥大、所罗门群岛、新卡伦多尼亚">太平洋中部<option value="+1200 威灵顿、奥克兰">纽西兰<option value="+1200 斐济、肯加塔、马歇尔群岛">斐济</option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></option></select>时间</font> <font id="tSave" style="COLOR: red; FONT-FAMILY: Wingdings; FONT-SIZE: 18pt"></font><br/><br/><font style="COLOR: green; FONT-FAMILY: Webdings; FONT-SIZE: 120pt">û</font><br/><font id="CITY" style="COLOR: blue; FONT-FAMILY: '宋体'; FONT-SIZE: 9pt; WIDTH: 150px"></font></p></td>
617<td align="middle">
618<div style="POSITION: absolute; TOP: 30px; Z-INDEX: -1"><font id="YMBG" style="COLOR: #f0f0f0; FONT-FAMILY: 'Arial Black'; FONT-SIZE: 100pt"> 0000<br/> JUN</font>
619</div>
620<table border="0">
621<tbody>
622<tr>
623<td bgcolor="#000080" colspan="7"><font color="#ffffff" size="2" style="FONT-SIZE: 9pt">西历<select name="SY" onchange="changeCld()" style="FONT-SIZE: 9pt">
624<script language="JavaScript"><!--   
625for(i=1900;i<2050;i++) document.write('<option>'+i)   
626//--></script>
627</select>年<select name="SM" onchange="changeCld()" style="FONT-SIZE: 9pt">
628<script language="JavaScript"><!--   
629for(i=1;i<13;i++) document.write('<option>'+i)   
630//--></script>
631</select>月</font> <font color="#ffffff" face="宋体" id="GZ" size="4"></font><br/></td></tr>
632<tr align="middle" bgcolor="#e0e0e0">
633<td width="54">日</td>
634<td width="54">一</td>
635<td width="54">二</td>
636<td width="50">三</td>
637<td width="54">四</td>
638<td width="54">五</td>
639<td width="54">六</td></tr>
640<script language="JavaScript"><!--   
641var gNum   
642for(i=0;i<6;i++) {   
643document.write('<tr align=center>')   
644for(j=0;j<7;j++) {   
645gNum = i*7+j   
646document.write('<td id="GD' + gNum +'" onMouseOver="mOvr(' + gNum +')" onMouseOut="mOut()"><font id="SD' + gNum +'" size=5 face="Arial Black"')   
647if(j == 0) document.write(' color=red')   
648if(j == 6)   
649if(i%2==1) document.write(' color=red')   
650else document.write(' color=green')   
651document.write(' TITLE=""> </font><br><font id="LD' + gNum + '" size=2 style="font-size:9pt"> </font></td>')   
652}   
653document.write('</tr>')   
654}   
655//--></script>
656</tbody></table></td>
657<td align="middle" valign="top" width="60"><br/><br/><br/><br/><button onclick="pushBtm('YU')" style="FONT-SIZE: 9pt">年↑</button><br/><button onclick="pushBtm('YD')" style="FONT-SIZE: 9pt">年↓</button>
658<p><button onclick="pushBtm('MU')" style="FONT-SIZE: 9pt">月↑</button><br/><button onclick="pushBtm('MD')" style="FONT-SIZE: 9pt">月↓</button>
659<p><button onclick="pushBtm('')" style="FONT-SIZE: 9pt">当月</button>
660<p><input onclick="location.href='http://www.sjzu.edu.cn/'" style="FONT-SIZE: 9pt" type="button" value="首页"/>
661</p></p></p></td></tr></tbody></table></form></center>
662</body></html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus