老班长休闲吧's Archiver

老班长 发表于 2006-4-21 15:13

鼠标指向提示信息美化,只改一个文件即可

打开 include/common.js,
在最末加上下面代码即可


[code]var pltsPop=null;
var pltsoffsetX = 10;
var pltsoffsetY = 15;
var pltsPopbg="#FFFFEE"; //这里是背景色
var pltsPopfg="#ffffff"; //这里是前景色
var pltsTitle="";
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.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
    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))pltsTitle="老班长 温馨提示";
        else{
          re=/\{(.[^\{]*)\}(.*)/ig;
            pltsTitle=Msg.replace(re,"$1")+"&nbsp;";
          re=/\{(.[^\{]*)\}/ig;
          Msg=Msg.replace(re,"");
          Msg=Msg.replace("<br>","");}
          var attr=(document.location.toString().toLowerCase().indexOf("list.asp")>0?"nowrap":"");
               var content =
              '<table style="FILTER:alpha(opacity=80) shadow(color=#bbbbbb,direction=135);" id=toolTipTalbe border=0><tr><td width="100%"><table class=tableBorder1 cellspacing="1" cellpadding="0" style="width:100%">'+
              '<tr id=pltsPoptop><th height=18 valign=bottom><font color=white><b><p id=topleft align=left>↖'+pltsTitle+'</p><p id=topright align=right style="display:none">'+pltsTitle+'↗</font></b></font></th></tr>'+
              '<tr><td "+attr+" class=tablebody1 style="padding-left:14px;padding-right:14px;padding-top: 6px;padding-bottom:6px;line-height:135%">'+Msg+'</td></tr>'+
              '<tr id=pltsPopbot style="display:none"><th height=18 valign=bottom><font color=white><b><p id=botleft align=left>↙'+pltsTitle+'</p><p id=botright align=right style="display:none">'+pltsTitle+'↘</font></b></font></th></tr>'+
              '</table></td></tr></table>';
               pltsTipLayer.innerHTML=content;
               toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2);
               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;
        //window.status=event.y;
        var popHeight=pltsTipLayer.clientHeight;
        var popWidth=pltsTipLayer.clientWidth;
        if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight)
        {
                  popTopAdjust=-popHeight-pltsoffsetY*1.5;
                  pltsPoptop.style.display="none";
                  pltsPopbot.style.display="";
        }
         else
        {
                   popTopAdjust=0;
                  pltsPoptop.style.display="";
                  pltsPopbot.style.display="none";
        }
        if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth)
        {
                popLeftAdjust=-popWidth-pltsoffsetX*2;
                topleft.style.display="none";
                botleft.style.display="none";
                topright.style.display="";
                botright.style.display="";
        }
        else
        {
                popLeftAdjust=0;
                topleft.style.display="";
                botleft.style.display="";
                topright.style.display="none";
                botright.style.display="none";
        }
        pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust;
        pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust;
          return true;
}
pltsinits();
document.write("<style type='text/css'>");
document.write(".tableBorder1{border: 1px #6699ee solid;background-color: #6699ee;FONT-SIZE: 12px}.TableBody1{background-color: #FFFFFF;}#loader {BORDER-RIGHT: #6699ee 3px solid; BORDER-TOP: #6699ee 3px solid; DISPLAY: none; FONT-SIZE: 12px; Z-INDEX: 2; FILTER: Alpha(opacity=60); LEFT: 0px; BORDER-LEFT: #6699ee 3px solid; BORDER-BOTTOM: #6699ee 3px solid; POSITION: absolute; BACKGROUND-COLOR: #fff}");
document.write("</style>");

[/code]

这样,不用在每个风格的css.htm中都增加css代码。

[img]http://img.ful.cn/20060405/23419_157997_2006421154029.jpg[/img]

风忆 发表于 2006-4-22 10:00

顶顶顶顶顶顶顶顶

hfpbxy 发表于 2006-4-25 15:01

顶!美化以后很漂亮!

老班长 发表于 2006-4-25 15:06

[quote]原帖由 [i]hfpbxy[/i] 于 2006-4-25  15:01 发表
顶!美化以后很漂亮! [/quote]



谢谢了

胡说八道 发表于 2006-4-25 15:56

顶,用了,好.

chinatopten 发表于 2006-4-26 17:17

顶,猛顶,哈哈:lol

页: [1]

老班长论坛,股票论坛,股票社区,绿色软件,破解补丁,休闲笑话,大型休闲理财论坛


声明:本站非以盈利为目的,所有信息都是免费的。承诺站内所有广告、网站导航 、及涉及到的所有链接,均与本站无任何关系,
请网民自行判断真假,谨防网上股票预测诈骗。本站内容摘自网络,若您的文章不愿被本站摘录,请及时通知我们。
网站收录查询

Powered by 老班长休闲吧 Archiver 6.1.0  © 2001-2007 oldbz.com老班长休闲吧