一个链接TITLE的效果

var  sPop  =   null ;
document.write(
" <style type='text/css'> " );
document.write(
" .PopText { font-family: Tahoma, 宋体; color: #000000; background-color: #f7f7f7; border: 1px #000000 dashed; font-size: 11px; line-height: 14px; padding: 4px; visibility: hidden; filter: Alpha(Opacity=0)} " );
document.write(
" </style> " );
document.write(
" <div id='popLayer' style='position:absolute;z-index:1000;filter:revealtrans(duration=.5,transition=12) revealTrans(duration=1,transition=23) alpha(opacity=90,enabled=100)' class='PopText'></div> " );

function  showPopupText()  {
    
var o=event.srcElement;
    MouseX
=event.x;
    MouseY
=event.y;
    
if(o.alt!=null && o.alt!=""{ o.pop=o.alt;o.alt="" }
        
if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="" } 
        
if(o.pop) 
            o.pop
=o.pop.replace(" ","<br>"); 
            o.pop
=o.pop.replace(" ","<br>");    
                    }

    
if(o.pop!=sPop) {
        sPop
=o.pop;
        
if(sPop==null || sPop==""{
            popLayer.filters[
0].apply();
            popLayer.style.visibility
="hidden";    
            popLayer.filters[
0].play();
            popLayer.style.width
=""
        }
 else {
            
if(o.dyclass!=null) popStyle=o.dyclass 
            
else popStyle="PopText";
             
            popLayer.filters[
1].apply();
            popLayer.style.visibility
="visible";
            popLayer.filters[
1].play();
            showIt();
            
if (popLayer.offsetWidth>500)
            
{
                popLayer.style.width
=500
            }

        }

    }

}


function  showIt()  {
    popLayer.className
=popStyle;
    popLayer.innerHTML
=sPop;

    popWidth
=popLayer.clientWidth;
    popHeight
=popLayer.clientHeight;
    
if(event.clientX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
        
else popLeftAdjust=0;
    
if(event.clientY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
        
else popTopAdjust=0;
    popLayer.style.left
=event.clientX+12+document.body.scrollLeft+popLeftAdjust;
    popLayer.style.top
=event.clientY+12+document.body.scrollTop+popTopAdjust;
}


document.onmouseover
= showPopupText;
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值