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

📄 cldshow7.js

📁 一、桌面助手V1.02简介   此软件为纯静态html页面
💻 JS
字号:
festivalcolor="red";todaycolor="aqua";stermcolor="blue";function gethint(cldObj){s="";if(cldObj.hint1.length>0) s+=replace(cldObj.hint1,"\r\n"," <br> ");if(cldObj.hint2.length>0){if(s.length>0) s+=" <br> ";;s=s+cldObj.hint2;}if(cldObj.hint3.length>0){if(s.length>0) s+=" <br> ";s=s+cldObj.hint3;}return s;}tY=0;tM=0;tD=0;
function drawCld(SY,SM){var i,sD,s,size;cldObj=new calendar(SY,SM);
ldyear=cldObj[0].lYear;nlyear=cyclical(ldyear-1900+36)+'【'+Animals[(ldyear-4)%12]+'】年';lsyear=cldObj[cldObj.length-1].lYear;
if(lsyear!=ldyear){nlyear+="-"+cyclical(lsyear-1900+36)+'【'+Animals[(lsyear-4)%12]+'】年';}document.getElementById("GZ").innerHTML=nlyear;document.getElementById("YMBG").innerHTML=monthName[SM];
for(i=0;i<42;i++){sObj=document.getElementById('SD'+i);lObj=document.getElementById('LD'+i);gObj=document.getElementById('GD'+i);
lObj.style.color='';sObj.style.color='';sObj.style.background='';gObj.style.background=backcolor;sD=i-cldObj.firstWeek;if(sD>-1&&sD<cldObj.length){cldObj[sD].v=i;sObj.innerHTML=sD+1;if(cldObj[sD].lDay==1){ts='<b>'+(cldObj[sD].isLeap?'闰':'')+cldObj[sD].lMonth+'月';if(!cldObj[sD].isLeap) ts+=(monthDays(cldObj[sD].lYear,cldObj[sD].lMonth)==29?'小':'大');ts+='</b>';lObj.innerHTML=ts;}else{lObj.innerHTML=GetcDay(cldObj[sD].lDay);}s=cldObj[sD].lunarFestival;
if(s.length>0){lObj.innerHTML=s;lObj.style.color=festivalcolor;sObj.style.color=festivalcolor;}
s=cldObj[sD].solarTerms;if(s.length>0){lObj.innerHTML=s;lObj.style.color=stermcolor;}}else{sObj.innerHTML='';lObj.innerHTML='';}}}var cldObj;function changeCld(){var y,m;y=document.CLDFORM.SY.selectedIndex+1900;m=document.CLDFORM.SM.selectedIndex;drawCld(y,m);srvread();}function pushBtm(K){switch(K){case 'YU':if(document.CLDFORM.SY.selectedIndex>0) document.CLDFORM.SY.selectedIndex--;break;case 'YD':if(document.CLDFORM.SY.selectedIndex<150) document.CLDFORM.SY.selectedIndex++;break;case 'MU':if(document.CLDFORM.SM.selectedIndex>0){document.CLDFORM.SM.selectedIndex--;}else{document.CLDFORM.SM.selectedIndex=11;if(document.CLDFORM.SY.selectedIndex>0) document.CLDFORM.SY.selectedIndex--;}break;case 'MD':if(document.CLDFORM.SM.selectedIndex<11){document.CLDFORM.SM.selectedIndex++;}else{document.CLDFORM.SM.selectedIndex=0;if(document.CLDFORM.SY.selectedIndex<150) document.CLDFORM.SY.selectedIndex++;}break;default:document.CLDFORM.SY.selectedIndex=tY-1900;document.CLDFORM.SM.selectedIndex=tM-1;}changeCld();}
function cldinit(){tY=nyear;tM=nmonth;tD=nday;document.CLDFORM.SY.selectedIndex=tY-1900;document.CLDFORM.SM.selectedIndex=tM-1;pushBtm('');
}var curd=null;function mClick(v){var sObj=document.getElementById('SD'+v);if(sObj.innerHTML!=''){curd=sObj.innerHTML-1;
showframe("hintset",-200,-100);hset.focuson();}else{curd=null;closeinput();}}function mOvr(v){sObj=document.getElementById('SD'+ v);if(sObj.innerHTML!=''){d=sObj.innerHTML-1;tmphint=gethint(cldObj[d]);if(tmphint.length>0){document.getElementById("detail").innerHTML=tmphint;showframe("detail",0,0);}}}function mOut(){hideframe("detail");}hintcolor="#FFCC00";function closeinput(){hideframe("hintset");}function drawhint(cobj){if(cobj.isToday){thint=gethint(cobj);if(thint.length>0){document.getElementById("todayhint").innerHTML=thint;document.getElementById("hintframe").style.display="block";
}}if(cobj.v>-1){sObj=document.getElementById('SD'+cobj.v);gObj=document.getElementById('GD'+cobj.v);hlen=gethint(cobj).length;if(hlen>0) gObj.style.background=hintcolor;else gObj.style.background=backcolor;if(cobj.isToday) sObj.style.background=todaycolor;else if(hlen>0) sObj.style.background=hintcolor;else sObj.style.background=backcolor;}}

⌨️ 快捷键说明

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