中华农历论坛知识讨论区历法知识 → [原创]电脑医生万年历和福星万年历最新历算源码


  共有44282人关注过本帖平板打印

主题:[原创]电脑医生万年历和福星万年历最新历算源码

帅哥哟,离线,有人找我吗?
chwc
  1楼 个性首页 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:603 积分:5315 威望:0 精华:4 注册:2008/4/21 19:06:00
[原创]电脑医生万年历和福星万年历最新历算源码  发帖心情 Post By:2011/2/28 19:34:00

电脑医生万年历和福星万年历最新历算源码。其它就不都说了源码如下:

  //-----電腦醫萬年暦及福星萬年暦提示特效-----//
  var dwn=document.writeln;
  dwn("<style>");
  dwn(".tableBorder7{width:800;solid; background-color: #000000;}");
  dwn("div{cursor:url('./7000wnldat/123.cur');}");
  dwn("a{cursor:url('./7000wnldat/123.cur');}");
  dwn("BUTTON{font-size: 13px;}");
  dwn(".font1 {line-height: 1px}");
  dwn(".font106 {font-weight: bold;color:#005E00;FONT-SIZE: 13px;line-height: 19px}");
  dwn(".font107 {FONT-SIZE: 12px;line-height: 20px}");
  dwn(".TableBody7{background-color: #eeeeee;}");
  dwn(".TableBody8{background-color: #FFCCCC;}");
  dwn(".TableBody9{background-color: #FCF8D3;}");
  dwn("</style>");//#B1EA45/#660033
var pltsPop=null;
var pltsoffsetX = 18;// 彈出窗於鼠標的距離;
var pltsoffsetY = 8;// 彈出窗於鼠標下方的距離;
var pltstips="";
document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>');
function pltsinits(){
    document.onmouseover   = plts;
    document.onmousemove = moveToMouseLoc;
}
function plts(){
    var o=event.srcElement;
    if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
    if(o.tips!=null && o.tips!=""){o.dypop=o.tips;o.tips=""};
    if(o.tips2!=null && o.tips2!=""){o.dypop=o.tips2;o.tips2=""};
    if(o.tips3!=null && o.tips3!=""){o.dypop=o.tips3;o.tips3=""};
    if(o.tips4!=null && o.tips4!=""){o.dypop=o.tips4;o.tips4=""};
    if(o.tips5!=null && o.tips5!=""){o.dypop=o.tips5;o.tips5=""};
    if(o.tips6!=null && o.tips6!=""){o.dypop=o.tips6;o.tips6=""};
    pltsPop=o.dypop;
    if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined")
    {
       pltsTipLayer.style.left=-1000;
       pltsTipLayer.style.display='';
       var Msg=pltsPop.replace(/\n/g,"<br>");
       Msg=Msg.replace(/\0x13/g,"<br>");
       var re=/\{(.[^\{]*)\}/ig;
       if(!re.test(Msg))pltstips="<font color=#ffffff>簡介或注釋</font>";
       else{
         re=/\{(.[^\{]*)\}(.*)/ig;
           pltstips=Msg.replace(re,"$1")+" ";
         re=/\{(.[^\{]*)\}/ig;
         Msg=Msg.replace(re,"");
         Msg=Msg.replace("<br>","");}var zsj='12px;padding-right:12px';
         var clre='class=tablebody7';if(o.tips2!=null)clre='class=TableBody8 align="center"';
         if(o.tips3!=null)clre='class=TableBody7 align="center"';
         if(o.tips4!=null)clre='class=TableBody9';if(o.tips6!=null)clre='class=TableBody8 align="left"',zsj='2px;padding-right:2px';
             var content =
             '<table style="FILTER:alpha(opacity=90) shadow(color=#bbbbbb,direction=135);" id=toolTipTalbe border=0><tr><td width="100%"><table class=tableBorder7 cellspacing="1" cellpadding="0" style="width:100%">'+
             '<tr><td "+attr+" '+clre+' style="padding-left:'+zsj+';padding-top: 6px;padding-bottom:6px;line-height:135%">'+Msg+'</td></tr>'+
             '</table></td></tr></table>';
              pltsTipLayer.innerHTML=content;
              toolTipTalbe.style.width=325;if(o.tips2!=null)toolTipTalbe.style.width=215;//
             if(o.tips3!=null)toolTipTalbe.style.width=325;if(o.tips5!=null)toolTipTalbe.style.width=188;
             if(o.tips6!=null)toolTipTalbe.style.width=298;moveToMouseLoc();
              return true;
       }else{
           pltsTipLayer.innerHTML='';
             pltsTipLayer.style.display='none';
              return true;
    }}
function moveToMouseLoc(){
       if(pltsTipLayer.innerHTML=='')return true;
       var MouseX=event.x;
       var MouseY=event.y;
       var popHeight=pltsTipLayer.clientHeight;
       var popWidth=pltsTipLayer.clientWidth;
       var LEFTWidth=pltsTipLayer.clientWidth;
       if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight)
       {
        var daoz=(MouseY+pltsoffsetY+popHeight)-document.body.clientHeight;
                popTopAdjust=pltsoffsetY-daoz-(pltsoffsetY*1.5);//-popHeight-pltsoffsetY*1.5;
       }else{
                 popTopAdjust=0;
       }
       if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth&&LEFTWidth>MouseX-pltsoffsetX*0.3)
       {
       popLeftAdjust=-popWidth-pltsoffsetX*1.5+(document.body.clientWidth-MouseX);
       }else{
       if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth)
       {
              popLeftAdjust=-popWidth-pltsoffsetX*1.5;
       }else{
              popLeftAdjust=0;
       }}
       pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust;
       pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust;
         return true;
}
pltsinits();

//////////////////////

//---數學函數或公用函數---//
  function sin(x){return Math.sin(x);}//正弦
  function asin(x){return Math.asin(x);}//反正弦
  function cos(x){return Math.cos(x);}//餘弦
  function acos(x){return Math.acos(x);}//反餘弦
  function abs(x){return Math.abs(x);}//絕對值
  function floor(x){return Math.floor(x);}//截去小數部份,取整;如:11.25只取出11
  function round(x){return Math.round(x);}//小數部份舍入n位數;如:11.205
  function tail(x){return x-floor(x);}//取出小數部份;如:11.25只取出0.25
  function rem(x,w){return tail(x/w)*w;}//廣義求餘
  function nnr(x,w){if(x<0){x+=(-x*w);}return x%w;}//非負餘數
  function sqrt(x){return Math.sqrt(x);}//數的平方根
  function tan(x){return Math.tan(x);}//正切
  function atan(x){return Math.atan(x);}//反正切
  function zjqz(x){return floor(x-tail(x));}//直接取整
  function ceil(x){return Math.ceil(x);}//返回大於等於其數字參數的最小整數
  function exp(x){return Math.exp(x);}//e(自然對數的底)的冪
  function log(x){return Math.log(x);}//數字的自然對數
  function PI(){return Math.PI;}//角度
  function ang(x,t,c1,t0,t2,t3){//角度計算
    return tail(c1*x)*2*PI()+t0-t2*t*t-t3*t*t*t;}
  function atan2(y,x){return Math.atan2(y,x);}//由X軸到(y,x)點的角度(以弧度為單位)
  function zfjq(a,b,c){return a.substring(b,c);}//字符串截取
  function zfctj(x,y){//字符串統計
    var k=0,n=0;while(1){k=x.indexOf(y,k)+1;if(k>0)n++;else return n;}}
  function rep(x,y,z){x=x.replace(y,z); return x;}//字符串替換
  function trim(s){return s.replace(/(^\s*)|(\s*$)/g,"");}//
  function gzs(v){//干支數-甲子=0、乙丑=1、……癸亥=59。
    var s=round(rem((v+49),60));return s;}
  function gan(x){//天干數
    return x%10;}
  function zhi(x){//地支數
    return x%12;}
 //---字符串轉換函數或公用字符串函數---//
  function jieya(s){//解压缩
  var o="0000000000",o2=o+o,o3=o2+o2+o2;
  s=s.replace(/J/g,'00');
  s=s.replace(/I/g,'000');
  s=s.replace(/H/g,'0000');
  s=s.replace(/G/g,'00000');
  s=s.replace(/t/g,'02');
  s=s.replace(/s/g,'002');
  s=s.replace(/r/g,'0002');
  s=s.replace(/q/g,'00002');
  s=s.replace(/p/g,'000002');
  s=s.replace(/o/g,'0000002');
  s=s.replace(/n/g,'00000002');
  s=s.replace(/m/g,'000000002');
  s=s.replace(/l/g,'0000000002');
  s=s.replace(/k/g,'01');
  s=s.replace(/j/g,'0101');
  s=s.replace(/i/g,'001');
  s=s.replace(/h/g,'001001');
  s=s.replace(/g/g,'0001');
  s=s.replace(/f/g,'00001');
  s=s.replace(/e/g,'000001');
  s=s.replace(/d/g,'0000001');
  s=s.replace(/c/g,'00000001');
  s=s.replace(/b/g,'000000001');
  s=s.replace(/a/g,'0000000001');
  s=s.replace(/z/g,o3+o3+o3+o3+o3+o3);
  s=s.replace(/w/g,o3+o3+o3+o3+o3);
  s=s.replace(/y/g,o3+o3+o3+o3);
  s=s.replace(/x/g,o3+o3+o3);
  s=s.replace(/V/g,o3+o3);
  s=s.replace(/A/g,o3);
  s=s.replace(/B/g,o2+o2+o);
  s=s.replace(/C/g,o2+o2);
  s=s.replace(/D/g,o2+o);
  s=s.replace(/E/g,o2);
  s=s.replace(/F/g,o);
  return s;
 }
  function jieyaNum(s){//解压缩2
  s=s.replace(/k/g,'00c00c0c00c00c00c0c00c00c0c00c00c00c0c00c00c0c00c00c00c0c');
  s=s.replace(/H/g,'00c00c0c00c00c00c0c');
  s=s.replace(/G/g,'00c00c00c0c');
  s=s.replace(/t/g,'00c00c0c');
  s=s.replace(/f/g,'00c');
  return s;
 }

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:历算的源码.rar


支持(0中立(0反对(0单帖管理 | 引用 | 回复 回到顶部
总数 39 1 2 3 4 下一页

返回版面帖子列表

[原创]电脑医生万年历和福星万年历最新历算源码








签名