最完美的JS万年历(三)

发表于:2007-06-30来源:作者:点击数: 标签:
///////////////////////////////////////////////////////// function changeTZ() { CITY.innerHTML = CLD.TZ.value.substr(6); var pos = Math.floor(CLD.TZ.value.substr(0,3)); if(pos0) pos+=24; pos*=-10; world.style.left = pos; } function tick() {
/////////////////////////////////////////////////////////

function changeTZ() {
   CITY.innerHTML = CLD.TZ.value.substr(6);
   var pos = Math.floor(CLD.TZ.value.substr(0,3));
   if(pos<0) pos+=24;
   pos*=-10;
   world.style.left = pos;
}

function tick() {
   var today;
   today = new Date();
   Clock.innerHTML = today.toLocaleString();
   Clock2.innerHTML = TimeAdd(today.toGMTString(), CLD.TZ.value);
   window.setTimeout("tick()", 1000);
}

//-->
</SCRIPT>

<SCRIPT language=VBScript>
<!--
@#===== 算世界时间
Function TimeAdd(UTC,T)
   Dim PlusMinus, DST, y
   If Left(T,1)="-" Then PlusMinus = -1 Else PlusMinus = 1
   UTC=Right(UTC,Len(UTC)-5)
   UTC=Left(UTC,Len(UTC)-4)
   y = Year(UTC)
   TimeAdd=DateAdd("n", (Cint(Mid(T,2,2))*60 + Cint(Mid(T,4,2))) * PlusMinus, UTC)
   @#美国日光节约期间: 4月第一个星日00:00 至 10月最後一个星期日00:00
   If 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
      TimeAdd=DateAdd("h", 1, TimeAdd)
      tSave.innerHTML = "R"
      tSave.style.color= "Red"
   Else
      tSave.innerHTML = "R"
      tSave.style.color= "White"
   End If
   TimeAdd = FormatDateTime(Date, 1) & " " & FormatDateTime(TimeAdd,3)
End Function
@#-->
</SCRIPT>

<STYLE>.todyaColor {
    BACKGROUND-COLOR: aqua
}
</STYLE>

<META content="MSHTML 5.00.3315.2870" name=GENERATOR></HEAD>
<BODY onload=initialize() onunload=terminate()>
<SCRIPT language=JavaScript><!--
   if(navigator.appName == "Netscape" || parseInt(navigator.appVersion) < 4)
   document.write("<h1>你的浏览器无法执行此程序。</h1>此程序 在 IE4 以後的版本才能执行!!")
//--></SCRIPT>

<DIV id=detail
style="FILTER: shadow(color=#333333,direction=135); HEIGHT: 120px; POSITION: absolute; WIDTH: 140px"></DIV>
<CENTER>
<FORM name=CLD>
<TABLE border=0>
  <TBODY>
  <TR>
    <TD align=middle vAlign=top width=240><FONT size=2
      style="FONT-SIZE: 9pt">本地时间</FONT><BR><FONT color=#000080 face=Arial
      id=Clock size=2 align="center"></FONT>
      <P><FONT id=CITY
      style="FONT-FAMILY: @#宋体@#; FONT-SIZE: 9pt; HEIGHT: 28px; WIDTH: 150px"></FONT><BR><FONT
      color=#000080 face=Arial id=Clock2 size=2 align="center"></FONT><BR>
      <TABLE style="FONT-FAMILY: Wingdings; FONT-SIZE: 10pt">
        <TBODY>
        <TR>
          <TD align=middle>Ú
            <DIV
            style="BACKGROUND-COLOR: darkblue; HEIGHT: 120px; OVERFLOW: hidden; WIDTH: 240px"><FONT
            id=world
            style="COLOR: green; FONT-FAMILY: Webdings; FONT-SIZE: 185px; LEFT: 0px; POSITION: relative; TOP: -26px">ûû</FONT>
            </DIV>Ù </TD></TR></TBODY></TABLE><BR><!--时区 *表示自动调整为日光节约时间--><FONT
      id=tSave
      style="COLOR: white; FONT-FAMILY: Wingdings; FONT-SIZE: 18pt"></FONT><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="-0600 萨克其万(加拿大)                          ">加拿大中部<OPTION
        value="-0500 波哥大、利马、祁多                        ">南美洲太平洋<OPTION
        value="-0500*东部时间(美加)                            ">美加东部<OPTION
        value="-0500 印第安纳(东部)                            ">美东<OPTION
        value="-0400*圣地牙哥                                  ">太平洋SA<OPTION
        value="-0400 加拉卡斯、拉帕兹                          ">南美洲西部<OPTION
        value="-0400*大西洋时间(加拿大)                        ">大西洋<OPTION
        value="-0330*新岛(加拿大东岸)                          ">纽芬兰<OPTION
        value="-0300*格陵兰                                    ">格陵兰<OPTION
        value="-0300*波西里亚                                  ">东南美洲<OPTION
        value="-0300 布鲁诺斯爱丽斯、乔治城                    ">南美洲东部<OPTION
        value="-0200*大西洋中部                                ">大西洋中部<OPTION
        value="-0100 维德角群岛                                ">维德角<OPTION
        value="-0100*亚速尔群岛                                ">亚速尔<OPTION
        value="+0000 卡萨布兰卡、莫洛维亚(赖比瑞亚)            ">格林威治<OPTION
        value="+0000*格林威治:都柏林、爱丁堡、里斯本、伦敦     ">GMT<OPTION
        value="+0100 中西非                                    ">中西非<OPTION
        value="+0100*比欧瑞德、布拉提斯拉瓦、布达佩斯、布拉格  ">中欧<OPTION
        value="+0100*布鲁赛尔、哥本哈根、马德里、巴黎          ">罗马<OPTION
        value="+0100*沙拉耶佛、斯科比亚、苏非亚、华沙、札格瑞  ">中欧<OPTION
        value="+0100*阿姆斯特丹、柏林、罗马、斯德哥尔摩、维也纳 ">西欧<OPTION
        value="+0200*布加勒斯特                                ">西欧<OPTION
        value="+0200 耶路萨冷                                  ">耶路萨冷<OPTION
        value="+0200*开罗                                      ">埃及<OPTION
        value="+0200*雅典、伊斯坦堡、明斯克                    ">GTB<OPTION
        value="+0200 赫拉雷、皮托里                            ">南非<OPTION
        value="+0200*赫尔辛基、里加、泰里安                    ">FLE芬兰<OPTION
        value="+0300*巴格达                                    ">阿拉伯<OPTION
        value="+0300 奈洛比                                    ">东非<OPTION
        value="+0300 科威特、里雅德                            ">阿拉伯<OPTION
        value="+0300*莫斯科、圣彼得堡、窝瓦格瑞德              ">俄罗斯<OPTION
        value="+0330*德黑兰                                    ">伊朗<OPTION
        value="+0400*巴古、塔布理斯、费里凡                    ">高加索<OPTION
        value="+0400 阿布达比、莫斯凯                          ">阿拉伯<OPTION
        value="+0430 喀布尔                                    ">阿富汗<OPTION
        value="+0500*伊卡特林堡                                ">伊卡特林堡<OPTION
        value="+0500 伊斯兰马巴德、克洛奇、塔须肯              ">西亚<OPTION
        value="+0530 加尔各答、辰内、孟拜、新德里              ">印度<OPTION
        value="+0545 加德满都                                  ">尼泊尔<OPTION
        value="+0600*阿马提、诺曼斯比尔斯科                    ">中北亚<OPTION
        value="+0600 阿斯塔那、达卡                            ">中亚<OPTION
        value="+0600 斯里哈亚华登尼普拉                        ">斯里兰卡<OPTION
        value="+0630 仰光                                      ">缅甸<OPTION
        value="+0700*克拉斯诺亚尔斯克                          ">北亚<OPTION
        value="+0700 曼谷、河内、雅加达                        ">东南亚<OPTION
        value="+0800 北京、重庆、香港、澳门、乌鲁木齐           ">中国大陆<OPTION
        value="+0800 台北                                      ">中国台湾<OPTION
        value="+0800*伊尔库次克、乌兰巴图                      ">东北亚<OPTION
        value="+0800 吉隆坡、新加坡                            ">马来半岛<OPTION
        value="+0800 伯斯                                      ">澳洲西部<OPTION
        value="+0900 大阪、北海道、东京                        ">东京<OPTION
        value="+0900*亚库兹克                                  ">亚库兹克<OPTION
        value="+0900 汉城                                      ">韩国<OPTION
        value="+0930*爱德兰                                    ">澳洲中部<OPTION
        value="+0930 达尔文                                    ">澳洲中部<OPTION
        value="+1000 布里斯本                                  ">澳洲东部<OPTION
        value="+1000*坎培拉、墨尔本、雪梨                      ">澳洲东部<OPTION
        value="+1000*海参威                                    ">海参威<OPTION
        value="+1000*霍巴特                                    ">塔斯梅尼亚<OPTION
        value="+1000 关岛、莫斯比港                            ">西太平洋<OPTION
        value="+1100 马哥大、所罗门群岛、新卡伦多尼亚          ">太平洋中部<OPTION
        value="+1200 斐济、肯加塔、马歇尔群岛                  ">斐济<OPTION
        value="+1200*奥克兰、威灵顿                            ">纽西兰<OPTION
        value="+1300 努瓜娄发                                  ">东加</OPTION></SELECT>时间</FONT>

      <P></P></TD>
    <TD align=middle>
      <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>
      </DIV>
      <TABLE border=0>
        <TBODY>
        <TR>
          <TD bgColor=#000080 colSpan=7><FONT color=#ffffff size=2
            style="FONT-SIZE: 9pt">公历<SELECT name=SY onchange=changeCld()
            style="FONT-SIZE: 9pt">
              <SCRIPT language=JavaScript><!--
            for(i=1900;i<2051;i++) document.write(@#<option>@#+i)
            //--></SCRIPT>
            </SELECT>年<SELECT name=SM onchange=changeCld()
            style="FONT-SIZE: 9pt">
              <SCRIPT language=JavaScript><!--
            for(i=1;i<13;i++) document.write(@#<option>@#+i)
            //--></SCRIPT>
            </SELECT>月</FONT> <FONT color=#ffffff face=标楷体 id=GZ
            size=4></FONT><BR></TD></TR>
        <TR align=middle bgColor=#e0e0e0>
          <TD width=54>日</TD>
          <TD width=54>一</TD>
          <TD width=54>二</TD>
          <TD width=50>三</TD>
          <TD width=54>四</TD>
          <TD width=54>五</TD>
          <TD width=54>六</TD></TR>
        <SCRIPT language=JavaScript><!--
            var gNum
            for(i=0;i<6;i++) {
               document.write(@#<tr align=center>@#)
               for(j=0;j<7;j++) {
                  gNum = i*7+j
                  document.write(@#<td id="GD@# + gNum +@#" onMouseOver="mOvr(@# + gNum +@#)" onMouseOut="mOut()"><font id="SD@# + gNum +@#" size=5 face="Arial Black"@#)
                  if(j == 0) document.write(@# color=red@#)
                  if(j == 6)
                     if(i%2==1) document.write(@# color=red@#)
                        else document.write(@# color=green@#)
                  document.write(@# TITLE=""> </font><br><font id="LD@# + gNum + @#" size=2 style="font-size:9pt"> </font></td>@#)
               }
               document.write(@#</tr>@#)
            }
            //--></SCRIPT>
        </TBODY></TABLE></TD>
    <TD align=middle vAlign=top width=40><BR><BR><BR><BR><BUTTON
      onclick="pushBtm(@#YU@#)" onmouseout="this.style.color=@##000000@#"
      onmouseover="this.style.color=@#orange@#"
      style="BACKGROUND-COLOR: #f5f5f5; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal">年↑</BUTTON><BR><BUTTON
      onclick="pushBtm(@#YD@#)" onmouseout="this.style.color=@##000000@#"
      onmouseover="this.style.color=@#orange@#"
      style="BACKGROUND-COLOR: #f5f5f5; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal">年↓</BUTTON>

      <P><BUTTON onclick="pushBtm(@#MU@#)" onmouseout="this.style.color=@##000000@#"
      onmouseover="this.style.color=@#orange@#"
      style="BACKGROUND-COLOR: #f5f5f5; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal">月↑</BUTTON><BR><BUTTON
      onclick="pushBtm(@#MD@#)" onmouseout="this.style.color=@##000000@#"
      onmouseover="this.style.color=@#orange@#"
      style="BACKGROUND-COLOR: #f5f5f5; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal">月↓</BUTTON>

      <P><BUTTON onclick="pushBtm(@#@#)" onmouseout="this.style.color=@##000000@#"
      onmouseover="this.style.color=@#orange@#"
      style="BACKGROUND-COLOR: #f5f5f5; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal">当月</BUTTON>

      <P></P></TD></TR></TBODY></TABLE></FORM><BR><BR><SPAN style="FONT-SIZE: 9pt"><A
href="http://www.。。。/" target=_blank>。。。。学院</A></SPAN></CENTER>
<SCRIPT language=JavaScript>
<!--

if (window.Event)
  document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;

return false;
}

function norightclick(e)
{
if (window.Event)
{
  if (e.which == 2 || e.which == 3)
   return false;
}
else
  if (event.button == 2 || event.button == 3)
  {
   event.cancelBubble = true
   event.returnValue = false;
   return false;
  }

}

document.oncontextmenu = nocontextmenu;  // for IE5+
document.onmousedown = norightclick;  // for all others
//-->
</SCRIPT>
</BODY></HTML>

原文转自:http://www.ltesting.net