js日期

北京时间 2009年09月12日 星期六 16:44:27

 

代码
<span id="time">正在加载北京时间……</span>
<script>
(
function(){
var C="日一二三四五六";
var B='{0}年{1}月{2}日 星期{3} {4}:{5}:{6}';
var G=0;
function E(I,H){return I.replace(/{(\d)}/g,function(J,K){return H[K]})}
function D(H){return H<10?"0"+H:H}
window.baidu_time
=function(I){
var H=I.time;
if(G!=0){clearInterval(G);G=0}
A(H);
G
=setInterval(function(){H+=1000;A(H)},1000)
};
function A(I){
var H=new Date(I);
document.getElementById(
"time").innerHTML=E(B,[H.getFullYear(),D((H.getMonth()+1)),D(H.getDate()),C.charAt(H.getDay()),D(H.getHours()),D(H.getMinutes()),D(H.getSeconds())])}
function F(){
var H=document.createElement("SCRIPT");
H.src
="http://open.baidu.com/app?module=beijingtime&t="+new Date().getTime();
document.getElementsByTagName(
"HEAD")[0].appendChild(H);
setTimeout(
function(){F()},60000)}F()})();
</script>

 

 


2009年2月18日 10:18:24 星期三
<div id="jnkc"></div>
<script>setInterval("jnkc.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);</script>

 

网易邮箱-万年历 

代码
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-

transitional.dtd"
>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>网易邮箱-万年历</title>
<link href="http://mimg.yeah.net/assist/res/zl_style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body
{width:100%!important;width:98%}
</style>
<script language="javascript" src="http://mimg.163.com/js3style/servicejs/outlink_set_cookie.js"></script>
</head>
<body lang="zh" onload=initial() style="width:98%">


    
<!--内容 开始-->
    
<div class="Cont">
        
<div class="CAL_wid">
            
<div class="CAL_wid_LT"></div>
            
<div class="CAL_wid_LR"></div>
            
<div class="CAL_wid_top"></div>
            
<div class="CAL_LN"><div class="CAL_Az"></div><href="javascript:void(0)" class="CAL_A1" 

onclick
="pushBtm('YU')" title="上一年">上一年</a><href="javascript:void(0)" class="CAL_A2" title="上一月" 

onclick
="pushBtm('MU')">上一月</a><href="javascript:void(0)" title="今日" class="CAL_A3" onclick="pushBtm

('')"
></a><href="javascript:void(0)" class="CAL_A4" title="下一月" onclick="pushBtm('MD')">下一月</a><

href="javascript:void(0)" class="CAL_A5" title="下一年" onclick="pushBtm('YD')">下一年</a></div>
            
<!--日历内容区 开始-->
            
<div class="CAL_div">
  
<!--嵌入万年历代码 开始-->
  

<script language=javascript>
<!--
var lunarInfo = new Array(
0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,
0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,
0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,
0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,
0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,
0x06ca0,0x0b550,0x15355,0x04da0,0x0a5d0,0x14573,0x052d0,0x0a9a8,0x0e950,0x06aa0,
0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,
0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b5a0,0x195a6,
0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,
0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,
0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,
0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,
0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,
0x05aa0,0x076a3,0x096d0,0x04bd7,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,
0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0);

var solarMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
var Gan = new Array("","","","","","","","","","");
var Zhi = new Array("","","","","","","","","","","","");
var Animals = new Array("","","","","","","","","","","","");
var solarTerm = new Array("小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","

","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至")
var sTermInfo = new Array

(
0,21208,42467,63836,85337,107014,128867,150921,173149,195551,218072,240693,263343,285989,308563,331033,353350,37549

4,397447,419210,440795,462224,483532,504758)
var nStr1 = new Array('','','','','','','','','','','')
var nStr2 = new Array('','','廿','',' ')
var monthName = new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");

//国历节日 *表示放假日
var sFtv = new Array(
"0101*元旦",
"0214 情人节",
"0308 妇女节",
"0312 植树节",
"0315 消费者权益日",
"0401 愚人节",
"0501*劳动节",
"0504 青年节",
"0512 护士节",
"0601 儿童节",
"0701 建党节 香港回归纪念",
"0714 初伏",
"0724 中伏",
"0801 建军节",
"0813 末伏",
"0909 毛逝世纪念",
"0910 教师节",
"0928 孔子诞辰",
"1001*国庆节",
"1006 老人节",
"1024 联合国日",
"1112 孙中山诞辰纪念",
"1220 澳门回归纪念",
"1225 圣诞节",
"1226 毛诞辰纪念")

//农历节日 *表示放假日
var lFtv = new Array(
"0101*春节",
"0102*初二",
"0115 元宵节",
"0505*端午节",
"0707 七夕情人节",
"0715 中元节",
"0815*中秋节",
"0909 重阳节",
"1208 腊八节",
"1223 小年",
"0100*除夕")

var wFtv = new Array(
"0520 母亲节""0630 父亲节")

function lYearDays(y) {
   
var i, sum = 348
   
for(i=0x8000; i>0x8; i>>=1) sum += (lunarInfo[y-1900& i)? 10
   
return(sum+leapDays(y))
}

function leapDays(y) {
   
if(leapMonth(y))  return((lunarInfo[y-1900& 0x10000)? 3029)
   
else return(0)
}

function leapMonth(y) {
   
return(lunarInfo[y-1900& 0xf)
}

function monthDays(y,m) {
   
return( (lunarInfo[y-1900& (0x10000>>m))? 3029 )
}

function Lunar(objDate) {

   
var i, leap=0, temp=0
   
var baseDate = new Date(1900,0,31)
   
var offset   = (objDate - baseDate)/86400000

   
this.dayCyl = offset + 40
   
this.monCyl = 14

   
for(i=1900; i<2050 && offset>0; i++) {
      temp 
= lYearDays(i)
      offset 
-= temp
      
this.monCyl += 12
   }

   
if(offset<0) {
      offset 
+= temp;
      i
--;
      
this.monCyl -= 12
   }

   
this.year = i
   
this.yearCyl = i-1864

   leap 
= leapMonth(i)
   
this.isLeap = false

   
for(i=1; i<13 && offset>0; i++) {
      
if(leap>0 && i==(leap+1&& this.isLeap==false)
         { 
--i; this.isLeap = true; temp = leapDays(this.year); }
      
else
         { temp 
= monthDays(this.year, i); }

      
if(this.isLeap==true && i==(leap+1)) this.isLeap = false

      offset 
-= temp
      
if(this.isLeap == falsethis.monCyl ++
   }

   
if(offset==0 && leap>0 && i==leap+1)
      
if(this.isLeap)
         { 
this.isLeap = false; }
      
else
         { 
this.isLeap = true--i; --this.monCyl;}

   
if(offset<0){ offset += temp; --i; --this.monCyl; }

   
this.month = i
   
this.day = offset + 1
}

function solarDays(y,m) {
   
if(m==1)
      
return(((y%4 == 0&& (y%100 != 0|| (y%400 == 0))? 2928)
   
else
      
return(solarMonth[m])
}
function cyclical(num) {
   
return(Gan[num%10]+Zhi[num%12])
}

function calElement(sYear,sMonth,sDay,week,lYear,lMonth,lDay,isLeap,cYear,cMonth,cDay) {

      
this.isToday    = false;
      
this.sYear      = sYear;
      
this.sMonth     = sMonth;
      
this.sDay       = sDay;
      
this.week       = week;
      
this.lYear      = lYear;
      
this.lMonth     = lMonth;
      
this.lDay       = lDay;
      
this.isLeap     = isLeap;
      
this.cYear      = cYear;
      
this.cMonth     = cMonth;
      
this.cDay       = cDay;

      
this.color      = '';

      
this.lunarFestival = '';
      
this.solarFestival = '';
      
this.solarTerms    = '';

}

function sTerm(y,n) {
   
var offDate = new Date( ( 31556925974.7*(y-1900+ sTermInfo[n]*60000  ) + Date.UTC(1900,0,6,2,5) )
   
return(offDate.getUTCDate())
}

function calendar(y,m) {
    
   
var sDObj, lDObj, lY, lM, lD=1, lL, lX=0, tmp1, tmp2
   
var lDPOS = new Array(3)
   
var n = 0
   
var firstLM = 0

   sDObj 
= new Date(y,m,1)

   
this.length    = solarDays(y,m)
   
this.firstWeek = sDObj.getDay()

//alert(this.firstWeek);alert(this.length);
   for(var i=0;i<this.length;i++) {

      
if(lD>lX) {
         sDObj 
= new Date(y,m,i+1)
         lDObj 
= new Lunar(sDObj)
         lY    
= lDObj.year
         lM    
= lDObj.month
         lD    
= lDObj.day
         lL    
= lDObj.isLeap
         lX    
= lL? leapDays(lY): monthDays(lY,lM)

         
if(n==0) firstLM = lM
         lDPOS[n
++= i-lD+1
      }

      
this[i] = new calElement(y, m+1, i+1, nStr1[(i+this.firstWeek)%7],
                               lY, lM, lD
++, lL,
                               cyclical(lDObj.yearCyl) ,cyclical(lDObj.monCyl), cyclical(lDObj.dayCyl
++) )

//     if((i+this.firstWeek)%14==7)   this[i].color = "green";//'#FF5F07'
      if((i+this.firstWeek)%7==0)   this[i].color = "#FF5F08";//'#FF5F07'     
      if((i+this.firstWeek)%14==6) {this[i].color = "green";}//'#FF5F07'
      if((i+this.firstWeek)%14==13) {this[i].color = "#FF5F08";}//'#FF5F07'
   }

   tmp1
=sTerm(y,m*2  )-1
   tmp2
=sTerm(y,m*2+1)-1
   
this[tmp1].solarTerms = solarTerm[m*2]
   
this[tmp2].solarTerms = solarTerm[m*2+1]
   
if(m==3) {this[tmp1].color = "#FF5F08";}//清明节

   
for(i in sFtv)
      
if(sFtv[i].match(/^(\d{2})(\d{2})([\s\*])(.+)$/))
         
if(Number(RegExp.$1)==(m+1)) {
            
var fes = isLeg(RegExp.$4, y);
            
if(fes == ""continue;
            
this[Number(RegExp.$2)-1].solarFestival += fes + ' '
            
if(RegExp.$3=='*'this[Number(RegExp.$2)-1].color = '#FF5F08'
         }

   
for(i in wFtv)
      
if(wFtv[i].match(/^(\d{2})(\d)(\d)([\s\*])(.+)$/))
         
if(Number(RegExp.$1)==(m+1)) {
            tmp1
=Number(RegExp.$2)
            tmp2
=Number(RegExp.$3)
            
this[((this.firstWeek>tmp2)?7:0+ 7*(tmp1-1+ tmp2 - this.firstWeek].solarFestival += RegExp.$5 + ' '
         }

   
for(i in lFtv)
      
if(lFtv[i].match(/^(\d{2})(.{2})([\s\*])(.+)$/)) {
         tmp1
=Number(RegExp.$1)-firstLM
         
if(tmp1==-11) tmp1=1
         
if(tmp1 >=0 && tmp1<n) {
            tmp2 
= lDPOS[tmp1] + Number(RegExp.$2-1
            
if( tmp2 >= 0 && tmp2<this.length) {
               
this[tmp2].lunarFestival += RegExp.$4 + ' '
               
if(RegExp.$3=='*'){
                    
this[tmp2].color = '#FF5F08'
                }
            }
         }
      }

   
/*if((this.firstWeek+12)%7==5)
      this[12].solarFestival += '黑色星期五 '
*/
      
   
if(y==tY && m==tM) {
           
this[tD-1].isToday = true;
   }

}

function cDay(d){
   
var s;

   
switch (d) {
      
case 10:
         s 
= '初十'break;
      
case 20:
         s 
= '二十'break;
         
break;
      
case 30:
         s 
= '三十'break;
         
break;
      
default :
         s 
= nStr2[Math.floor(d/10)];
         s += nStr1[d%10];
   }
   
return(s);
}

var cld;

function drawCld(SY,SM) {
   
var i,sD,s,size;
   cld 
= new calendar(SY,SM);
    
if(SY == "undefined")debugger;
//   if(SY>1874 && SY<1909) yDisplay = '光绪' + (((SY-1874)==1)?'元':SY-1874)
//
   if(SY>1908 && SY<1912) yDisplay = '宣统' + (((SY-1908)==1)?'元':SY-1908)
//
   if(SY>1911 && SY<1950) yDisplay = '民国' + (((SY-1911)==1)?'元':SY-1911)
//
   if(SY>1949) yDisplay = '共和国' + (((SY-1949)==1)?'元':SY-1949)

   GZ.innerHTML 
= '&nbsp;&nbsp;农历' + cyclical(SY-1900+36+ '年 &nbsp;<span class=smlb>&nbsp;【</spzn><span 

class=smlb>
'+Animals[(SY-4)%12]+'</span><span class=smlb>】</span>';

   
//YMBG.innerHTML = "&nbsp;" + SY + "<BR>&nbsp;" + monthName[SM];


   
for(i=0;i<42;i++) {

      sObj
=$('SD'+ i);
      lObj
=$('LD'+ i);

      sObj.style.background 
= '';
      lObj.style.background 
= '';

      sD 
= i - cld.firstWeek;
      
if(sD == "undefined" || sD == undefined) debugger;
      
      
if(sD>-1 && sD<cld.length) {
         sObj.innerHTML 
= sD+1;
if(sObj.innerHTML == "undefined" || sObj.innerHTML == undefined || sObj.innerHTML.indexOf("und"!= -1) {
            
debugger;
        }
         
if(cld[sD].isToday){
                 sObj.style.background 
= '#DEFDFD';
                 lObj.style.background 
= '#91DAE3';
         }

         sObj.style.color 
= cld[sD].color;

         
if(cld[sD].lDay==1)
            lObj.innerHTML 
= '<b>'+(cld[sD].isLeap?'':''+ cld[sD].lMonth + '' + (monthDays(cld[sD].lYear,cld

[sD].lMonth)
==29?'':'')+'</b>';
         
else
            lObj.innerHTML 
= cDay(cld[sD].lDay);

         s
=cld[sD].lunarFestival;
         
if(s.length>0) {
            
if(s.length>5) s = s.substr(03)+'';
            s  
= "<span style='color:#FF5F07'>"+s+"</span>";//s.fontcolor('blue');s.fontcolor('FF5F07');
         }else {
            s
=cld[sD].solarFestival;
            
if(s.length>0) {
               size 
= (s.charCodeAt(0)>0 && s.charCodeAt(0)<128)?8:4;
               
if(s.length>size+1) s = s.substr(0, size-1)+'';
               s 
= "<span style='color:blue'>"+s+"</span>";//s.fontcolor('0168EA');
            }
            
else {
               s
=cld[sD].solarTerms;
               
if(s.length>0) s = s = "<span style='color:green'>"+s+"</span>";//s.fontcolor('44D7CF');
            }
         }
         
if(s.length>0) lObj.innerHTML = s;

      }
      
else {
         sObj.innerHTML 
= ' ';
         lObj.innerHTML 
= ' ';
      }
    
   }
    
var sss = "";

}


function changeCld() {
   
var y,m;
   y 
= CLD.SY.selectedIndex+1900;
   m 
= CLD.SM.selectedIndex;
   drawCld(y,m);
}

function pushBtm(K) {
   
switch (K){
      
case 'YU' :
         
if(CLD.SY.selectedIndex>0) CLD.SY.selectedIndex--;
         
break;
      
case 'YD' :
         
if(CLD.SY.selectedIndex<149) CLD.SY.selectedIndex++;
         
break;
      
case 'MU' :
         
if(CLD.SM.selectedIndex>0) {
            CLD.SM.selectedIndex
--;
         }
         
else {
            CLD.SM.selectedIndex
=11;
            
if(CLD.SY.selectedIndex>0) CLD.SY.selectedIndex--;
         }
         
break;
      
case 'MD' :
         
if(CLD.SM.selectedIndex<11) {
            CLD.SM.selectedIndex
++;
         }
         
else {
            CLD.SM.selectedIndex
=0;
            
if(CLD.SY.selectedIndex<149) CLD.SY.selectedIndex++;
         }
         
break;
      
default :
         CLD.SY.selectedIndex
=tY-1900;
         CLD.SM.selectedIndex
=tM;
   }
   changeCld();
}

var Today = new Date();
var tY = Today.getFullYear();
var tM = Today.getMonth();
var tD = Today.getDate();

var width = "130";
var offsetx = -85;
var offsety = -105;
if(!document.all)offsety = -10;
var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;

var dStyle;
document.onmousemove 
= mEvn;
function $(sId){return document.getElementById(sId);}
function mOvr(event, v) {
   
var s,festival;
   
var sObj=$('SD'+ v);
   
var d=sObj.innerHTML-1;

   
if(sObj.innerHTML!='') {
      sObj.style.cursor 
= 'pointer';
      
if(cld[d].solarTerms == '' && cld[d].solarFestival == '' && cld[d].lunarFestival == '')
         festival 
= '';
      
else
         festival 
= '<table width=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR="#0978A6"><tr><td>'+
         
'<b><font style="font-SIZE:12px; color:#FFF">'+cld[d].solarTerms + ' ' + cld[d].solarFestival + ' ' + cld

[d].lunarFestival
+'</font></b></td>'+
         
'</tr></table>';
      s
= '<table cellSpacing=0 cellPadding=2 width=130 border=0><TBODY><tr><td>' +
         
'<table cellSpacing=0 cellPadding=0 width="100%" bgColor=#DCEDF5 border=0><tr><td ALIGN="right"><font 

COLOR="#000000" STYLE="font-size:12px;">
'+
         cld[d].sYear
+' 年 '+cld[d].sMonth+' 月 '+cld[d].sDay+' 日<br>星期'+cld[d].week+'<br>'+
         
'<font color="02346F">农历'+(cld[d].isLeap?'闰 ':' ')+cld[d].lMonth+' 月 '+cld[d].lDay+' 日</font><br>'+
         
'<font color="02346F">'+cld[d].cYear+'年 '+cld[d].cMonth+'月 '+cld[d].cDay + '日</font>'+
         
'</font></td></tr></table>'+ festival +'</td></tr></table>';
        $(
"detail").innerHTML = s;
        x 
= fPointerX(event);
        y 
= fPointerY(event);
        
if (snow == 0) {
            dStyle.left 
= x + offsetx + "px";
            dStyle.top    
= y + offsety + "px";
            dStyle.visibility 
= "visible";
            snow 
= 1;
        }
    }
}

function mOut(event) {
    
if ( cnt >= 1 ) { sw = 0 }
    
if ( sw == 0 ) { snow = 0;    dStyle.visibility = "hidden";}
    
else cnt++;
}

function mEvn(e) {
    
var event = window.event || e;
    x 
= fPointerX(event);
    y 
= fPointerY(event);
    
if (snow){
        dStyle.left 
= x + offsetx + "px";
        dStyle.top    
= y + offsety + "px";
    }
}


function fPointerX(event) {
    
var doc = document;
    
return event.pageX || (event.clientX +
      (doc.documentElement.scrollLeft 
|| doc.body.scrollLeft));
}


function fPointerY(event) {
    
var doc = document;
    
return event.pageY || (event.clientY +
      (doc.documentElement.scrollTop 
|| doc.body.scrollTop));
}

function changeTZ() {
   CITY.innerHTML 
= CLD.TZ.value.substr(6)
   setCookie(
"TZ",CLD.TZ.selectedIndex)
}

function setCookie(name, value) {
    
var today = new Date()
    
var expires = new Date()
    expires.setTime(today.getTime() 
+ 1000*60*60*24*365)
    document.cookie 
= name + "=" + escape(value)    + "; expires=" + expires.toGMTString()
}

function getCookie(Name) {
   
var search = Name + "="
   
if(document.cookie.length > 0) {
      offset 
= document.cookie.indexOf(search)
      
if(offset != -1) {
         offset 
+= search.length
         end 
= document.cookie.indexOf(";", offset)
         
if(end == -1) end = document.cookie.length
         
return unescape(document.cookie.substring(offset, end))
      }
      
else return ""
   }
}

var CLD;
var GZ;
function initial() {
   CLD 
= $("CLD");
   GZ 
= $("GZ");
   dStyle 
= $("detail").style;
   CLD.SY.selectedIndex
=tY-1900;
   CLD.SM.selectedIndex
=tM;
   
if(!document.all){
        offsety 
= -100;
   }
   drawCld(tY,tM);
}
function isLeg(fes, y){
    y 
= y - 0;
    
switch(fes){
        
case "元旦":
            
if(y>1911 && y<1950){
                
            }
else if(y>1949){
                fes 
= "新年";
            }
else{
                fes 
= "";
            }
            
break;
        
case "情人节":
            
break;        
        
case "妇女节":
            
if(y<1911) fes = "";
            
break;
        
case "植树节":
            
if(y<1979) fes = "";
            
break;
        
case "消费者权益日":
            
if(y<1988) fes = "";
            
break;
        
case "愚人节":
            
if(y<1564) fes = "";
            
break;
        
case "劳动节":
            
if(y<1890) fes = "";
            
break;
        
case "青年节":
            
if(y<1950) fes = "";
            
break;
        
case "护士节":
            
if(y<1912) fes = "";
            
break;
        
case "儿童节":
            
break;
        
case "建党节 香港回归纪念":
            
if(y<1911) fes = "";
            
else if(y>1920 && y<1997) fes = "建党节";
            
else fes = "中共建党纪念日/香港回归纪念日";
            
break;
        
case "建军节":
            
break;
        
case "父亲节":
            
break;
        
case "毛泽逝世纪念":
            
if(y<1976) fes = "";
            
break;
        
case "教师节":
            
if(y<1985) fes = "";
            
break;
        
case "孔子诞辰":
            
break;
        
case "国庆节":
            
if(y<1949) fes = "";
            
break;
        
case "老人节":
            
break;
        
case "联合国日":
            
if(y<1945) fes = "";
            
break;
        
case "孙中山诞辰纪念":
            
if(y<1966) fes = "";
            
break;
        
case "澳门回归纪念":
            
if(y<1999) fes = "";
            
break;
        
case "初伏":
            
if(y!=2009) fes = "";
            
break;
        
case "中伏":
            
if(y!=2009) fes = "";
            
break;
        
case "末伏":
            
if(y!=2009) fes = "";
            
break;
        
case "圣诞节":
            
break;
        
case "毛诞辰纪念":
            
if(y<1893) fes = "";
            
break;
    }
    
return fes;
}


//-->
</script>

<div id="detail" style="position:absolute;visibility:visible;"></div>
<FORM name=CLD id=CLD>
<table cellSpacing=0 cellPadding=0 align=center border=0>
<tbody>
<tr>
<td class=bs vAlign=top width=>
</td>
<td class=lb vAlign=top width=100%>
<table cellSpacing=0 cellPadding=0 width=100% border=0>
<tbody>
<tr bgColor=#F2F4F4>
<td height=30> &nbsp;<strong>当前查看:</strong><SPAN class=sm><font color=#333399>公历 </font>
<font style="font-SIZE: 9pt" color=#ffffff>
<SELECT onchange=changeCld() name="SY" id="SY"> 
    
<option>1900</option><option>1901</option><option>1902</option>
    
<option>1903</option><option>1904</option><option>1905</option>
    
<option>1906</option><option>1907</option><option>1908</option>
    
<option>1909</option><option>1910</option><option>1911</option>
    
<option>1912</option><option>1913</option><option>1914</option>
    
<option>1915</option><option>1916</option><option>1917</option>
    
<option>1918</option><option>1919</option><option>1920</option>
    
<option>1921</option><option>1922</option><option>1923</option>
    
<option>1924</option><option>1925</option><option>1926</option>
    
<option>1927</option><option>1928</option><option>1929</option>
    
<option>1930</option><option>1931</option><option>1932</option>
    
<option>1933</option><option>1934</option><option>1935</option>
    
<option>1936</option><option>1937</option><option>1938</option>
    
<option>1939</option><option>1940</option><option>1941</option>
    
<option>1942</option><option>1943</option><option>1944</option>
    
<option>1945</option><option>1946</option><option>1947</option>
    
<option>1948</option><option>1949</option><option>1950</option>
    
<option>1951</option><option>1952</option><option>1953</option>
    
<option>1954</option><option>1955</option><option>1956</option>
    
<option>1957</option><option>1958</option><option>1959</option>
    
<option>1960</option><option>1961</option><option>1962</option>
    
<option>1963</option><option>1964</option><option>1965</option>
    
<option>1966</option><option>1967</option><option>1968</option>
    
<option>1969</option><option>1970</option><option>1971</option>
    
<option>1972</option><option>1973</option><option>1974</option>
    
<option>1975</option><option>1976</option><option>1977</option>
    
<option>1978</option><option>1979</option><option>1980</option>
    
<option>1981</option><option>1982</option><option>1983</option>
    
<option>1984</option><option>1985</option><option>1986</option>
    
<option>1987</option><option>1988</option><option>1989</option>
    
<option>1990</option><option>1991</option><option>1992</option>
    
<option>1993</option><option>1994</option><option>1995</option>
    
<option>1996</option><option>1997</option><option>1998</option>
    
<option>1999</option><option>2000</option><option>2001</option>
    
<option>2002</option><option>2003</option><option>2004</option>
    
<option>2005</option><option>2006</option><option>2007</option>
    
<option selected>2008</option>
    
<option>2009</option><option>2010</option><option>2011</option>
    
<option>2012</option><option>2013</option><option>2014</option>
    
<option>2015</option><option>2016</option><option>2017</option>
    
<option>2018</option><option>2019</option><option>2020</option>
    
<option>2021</option><option>2022</option><option>2023</option>
    
<option>2024</option><option>2025</option><option>2026</option>
    
<option>2027</option><option>2028</option><option>2029</option>
    
<option>2030</option><option>2031</option><option>2032</option>
    
<option>2033</option><option>2034</option><option>2035</option>
    
<option>2036</option><option>2037</option><option>2038</option>
    
<option>2039</option><option>2040</option><option>2041</option>
    
<option>2042</option><option>2043</option><option>2044</option>
    
<option>2045</option><option>2046</option><option>2047</option>
    
<option>2048</option><option>2049</option>
</SELECT> 
</font>
<font color=#333399>年 </font>
<font style="font-size: 9pt" color=#ffffff>
<select onchange="changeCld()" name=SM id="SM">
    
<option>1</option>
    
<option>2</option>
    
<option>3</option>
    
<option>4</option>
    
<option>5</option>
    
<option>6</option>
    
<option>7</option>
    
<option>8</option>
    
<option>9</option>
    
<option>10</option>
    
<option>11</option>
    
<option>12</option>
 
</select> 
 
</font></SPAN><font style="font-SIZE: 9pt" color=#ffffff></font><SPAN class=sm><font color=#333399>

</font></font><font class=sm id=GZ><font color=#333399>&nbsp;&nbsp;农历戊子年 &nbsp;</font><SPAN class=smlb><font 

color=#0099ff>&nbsp;</SPZN><SPAN class=smlb></SPAN><SPAN class=smlb></SPAN></font></SPAN></font><font 

color=#333399> </font></SPAN></td></tr></TBODY></table>
<table cellSpacing=1 cellPadding=0 width="100%" border=0>
<TBODY>
<tr>
<td vAlign=bottom>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<tr>
<td>
<table cellSpacing=1 cellPadding=0 width=100% align=center border=0>
<TBODY>
<tr>
<td class=ch align=middle height=40>
<table height="40" cellSpacing=3 cellPadding=0 width=100% border=0>
<TBODY>
<tr class=sunday align=middle>
<td width=57 class="weekend_ms"></td>
<td width=57></td>
<td width=57></td>
<td width=57>三 </td>
<td width=57></td>
<td width=57></td>
<td width=57 class="weekend_ms"></td>
</tr></TBODY></table></td></tr>

<SCRIPT language=JavaScript><!--
var gNum
for(i=0;i<6;i++) {
   document.write(
' <tr><td align=middle bgColor=#fafbfb height=40><table class="cal_day_NO" cellSpacing=1 

cellPadding=0><TBODY><tr align=middle> 
')
   
for(j=0;j<7;j++) {
      gNum 
= i*7+j
      document.write(
'<td align="center" id="SD' + gNum +'" onMouseOver="mOvr(event, ' + gNum +')" 

onMouseOut="mOut(event)" width="57" style="BACKGROUND: none transparent scroll repeat 0% 0%; cursor : default; 

COLOR: #ff5f08" TITLE=""
')
      
if(j == 0){
            document.write(
' class="aorange"')
      }
else if(j == 6){
         
if(i%2==1) document.write(' class="aorange"')
            
else document.write(' class="agreen"')
      }
else{
            document.write(
' class="one"')
      }
      document.write(
' TITLE=""> </td>')
   }
   document.write(
'</tr></table></td></tr><tr><td height="20" align="middle" bgcolor="#F3F5F8"><table 

class="cal_day_jr" cellSpacing=1 cellPadding=0><TBODY><tr align="center"> 
')
   
for(j=0;j<7;j++) {
      gNum 
= i*7+j
      document.write(
'<td align="center" id="LD' + gNum +'" onMouseOver="mOvr(event,' + gNum +')" 

onMouseOut="mOut()" width="57" class="bs" TITLE="" style="BACKGROUND: none transparent scroll repeat 0% 0%; cursor : 

default; COLOR: #666666"> </td>
')
   }
   document.write(
'</tr></table></td></tr>')
}
//--></SCRIPT>
</tbody></table></td></tr></tbody></table></td></tr></tbody></table></td>
<td valign=top></td></tr></form></tbody></table>  
  <!--嵌入万年历代码 结束-->            
            
</div>
            <!--日历内容区 结束-->
        
</div>
    </div>
</body>
</html>

 

 

posted @ 2009-09-12 16:46  曾祥展  阅读(613)  评论(0编辑  收藏  举报