⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 日历.htm

📁 希望大家多多交流
💻 HTM
📖 第 1 页 / 共 4 页
字号:
   y=event.y;   if (document.body.scrollLeft)      {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}   if (snow){      dStyle.left = x+offsetx-(width/2);      dStyle.top = y+offsety;   }}/*****************************************************************************                                  世界时间计算*****************************************************************************/var OneHour = 60*60*1000;var OneDay = OneHour*24;var TimezoneOffset = Today.getTimezoneOffset()*60*1000;function showUTC(objD) {   var dn,s;   var hh = objD.getUTCHours();   var mm = objD.getUTCMinutes();   var ss = objD.getUTCSeconds();   s = objD.getUTCFullYear() + "年" + (objD.getUTCMonth() + 1) + "月" + objD.getUTCDate() +"日 ("+ nStr1[objD.getUTCDay()] +")";   if(hh>12) { hh = hh-12; dn = '下午'; }   else dn = '上午';   if(hh<10) hh = '0' + hh;   if(mm<10) mm = '0' + mm;   if(ss<10) ss = '0' + ss;   s += " " + dn + ' ' + hh + ":" + mm + ":" + ss;   return(s);}function showLocale(objD) {   var dn,s;   var hh = objD.getHours();   var mm = objD.getMinutes();   var ss = objD.getSeconds();   s = objD.getFullYear() + "年" + (objD.getMonth() + 1) + "月" + objD.getDate() +"日 ("+ nStr1[objD.getDay()] +")";   if(hh>12) { hh = hh-12; dn = '下午'; }   else dn = '上午';   if(hh<10) hh = '0' + hh;   if(mm<10) mm = '0' + mm;   if(ss<10) ss = '0' + ss;   s += " " + dn + ' ' + hh + ":" + mm + ":" + ss;   return(s);}//传入时差字串, 返回偏移之正负毫秒function parseOffset(s) {   var sign,hh,mm,v;   sign = s.substr(0,1)=='-'?-1:1;   hh = Math.floor(s.substr(1,2));   mm = Math.floor(s.substr(3,2));   v = sign*(hh*60+mm)*60*1000;   return(v);}//返回UTC日期控件 (年,月-1,第几个星期几,几点)function getWeekDay(y,m,nd,w,h){   var d,d2,w1;   if(nd>0){      d = new Date(Date.UTC(y, m, 1));      w1 = d.getUTCDay();      d2 = new Date( d.getTime() + ((w<w1? w+7-w1 : w-w1 )+(nd-1)*7   )*OneDay + h*OneHour);   }   else {      nd = Math.abs(nd);      d = new Date( Date.UTC(y, m+1, 1)  - OneDay );      w1 = d.getUTCDay();      d2 = new Date( d.getTime() + (  (w>w1? w-7-w1 : w-w1 )-(nd-1)*7   )*OneDay + h*OneHour);   }   return(d2);}//传入某时间值, 日光节约字串 返回 true 或 falsefunction isDaylightSaving(d,strDS) {   if(strDS == '') return(false);   var m1,n1,w1,t1;   var m2,n2,w2,t2;   with (Math){      m1 = floor(strDS.substr(0,2))-1;      w1 = floor(strDS.substr(3,1));      t1 = floor(strDS.substr(4,1));      m2 = floor(strDS.substr(6,2))-1;      w2 = floor(strDS.substr(9,1));      t2 = floor(strDS.substr(10,1));   }   switch(strDS.substr(2,1)){      case 'F': n1=1; break;      case 'L': n1=-1; break;      default : n1=0; break;   }   switch(strDS.substr(8,1)){      case 'F': n2=1; break;      case 'L': n2=-1; break;      default : n2=0; break;   }   var d1, d2, re;   if(n1==0)      d1 = new Date(Date.UTC(d.getUTCFullYear(), m1, Math.floor(strDS.substr(2,2)),t1));   else      d1 = getWeekDay(d.getUTCFullYear(),m1,n1,w1,t1);   if(n2==0)      d2 = new Date(Date.UTC(d.getUTCFullYear(), m2, Math.floor(strDS.substr(8,2)),t2));   else      d2 = getWeekDay(d.getUTCFullYear(),m2,n2,w2,t2);   if(d2>d1)      re = (d>d1 && d<d2)? true: false;   else      re = (d>d1 || d<d2)? true: false;   return(re);}var isDS = false;//计算全球时间function getGlobeTime() {   var d,s;   d = new Date();   d.setTime(d.getTime()+parseOffset(objTimeZone[0]));   isDS=isDaylightSaving(d,objTimeZone[1]);   if(isDS) d.setTime(d.getTime()+OneHour);   return(showUTC(d));}var objTimeZone;var objContinentMenu;var objCountryMenu;function tick() {   var today;   today = new Date();   LocalTime.innerHTML = showLocale(today);   GlobeTime.innerHTML = getGlobeTime();   window.setTimeout("tick()", 1000);}//指定自定索引时区function setTZ(a,c){   objContinentMenu.options[a].selected=true;   chContinent();   objCountryMenu.options[c].selected=true;   chCountry();}//变更区域function chContinent() {   var key,i;   continent = objContinentMenu.options[objContinentMenu.selectedIndex].text;   for (var i = objCountryMenu.options.length-1; i >= 0; i--)      objCountryMenu[0]=null;   for (key in timeData[continent])      objCountryMenu.options[objCountryMenu.options.length]=new Option(key);   objCountryMenu.options[0].selected=true;   chCountry();}//变更国家function chCountry() {   var txtContinent = objContinentMenu.options[objContinentMenu.selectedIndex].text;   var txtCountry = objCountryMenu.options[objCountryMenu.selectedIndex].text;   objTimeZone = timeData[txtContinent][txtCountry];   getGlobeTime();   //地图位移   City.innerHTML = (isDS==true?"<SPAN STYLE='font-size:12pt;font-family:Wingdings; color:Red;'>R</span> ":'') + objTimeZone[2]; //首都   var pos = Math.floor(objTimeZone[0].substr(0,3));   if(pos<0) pos+=24;   pos*=-10;   world.style.left = pos;}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('');   }   else return('');}///////////////////////////////////////////////////////////////////////////function initialize() {   var key;   //时间   map.filters.Light.Clear();   map.filters.Light.addAmbient(255,255,255,60);   map.filters.Light.addCone(120, 60, 80, 120, 60, 255,255,255,120,60);   objContinentMenu=document.WorldClock.continentMenu;   objCountryMenu=document.WorldClock.countryMenu;   for (key in timeData)      objContinentMenu[objContinentMenu.length]=new Option(key);   var TZ1 = getCookie('TZ1');   var TZ2 = getCookie('TZ2');   if(TZ1=='') {TZ1=0; TZ2=3;}   setTZ(TZ1,TZ2);   tick();   //阴历   dStyle = detail.style;   CLD.SY.selectedIndex=tY-1900;   CLD.SM.selectedIndex=tM;   drawCld(tY,tM);}function terminate() {   setCookie("TZ1",objContinentMenu.selectedIndex);   setCookie("TZ2",objCountryMenu.selectedIndex);}//--></SCRIPT><STYLE>.todyaColor {	BACKGROUND-COLOR: aqua}</STYLE><META content="MSHTML 6.00.2900.2523" name=GENERATOR><META content=FrontPage.Editor.Document name=ProgId></HEAD><BODY onload=initialize() onunload=terminate()><P align=center><FONT color=#800000><B><FONT size=6>实用万年历</FONT></B><B><BR></B><P> <SCRIPT language=JavaScript><!--       if(navigator.appName == "Netscape" || parseInt(navigator.appVersion) < 4)       document.write("<h1>你的浏览器无法执行此程序。</h1>此程序需在 IE4 以后的版本才能执行!!")    //--></SCRIPT> </P><DIV id=detail style="Z-INDEX: 3; FILTER: shadow(color=#333333,direction=135); WIDTH: 140px; POSITION: absolute; HEIGHT: 120px"></DIV><CENTER><TABLE border=0>  <TBODY>  <TR><!------------------------------ 世界时间 ----------------------------------->    <FORM name=WorldClock>    <TD vAlign=top align=middle width=240><FONT style="FONT-SIZE: 9pt"       size=2>本地时间</FONT><BR><SPAN id=LocalTime       style="FONT-SIZE: 11pt; COLOR: #000080; FONT-FAMILY: Arial">0000年0月0日( )午       00:00:00</SPAN>       <P><SPAN id=City       style="FONT-SIZE: 9pt; WIDTH: 150px; FONT-FAMILY: '新宋体'">中国</SPAN><BR><SPAN       id=GlobeTime       style="FONT-SIZE: 11pt; COLOR: #000080; FONT-FAMILY: Arial">0000年0月0日( )午       00:00:00</SPAN><BR>      <TABLE style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings">        <TBODY>        <TR>          <TD align=middle>&Uacute;             <DIV id=map             style="FILTER: Light; OVERFLOW: hidden; WIDTH: 240px; HEIGHT: 120px; BACKGROUND-COLOR: mediumblue"><FONT             id=world             style="FONT-SIZE: 185px; LEFT: 0px; COLOR: green; FONT-FAMILY: Webdings; POSITION: relative; TOP: -26px">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -