1 tPopWait=50; 2 tPopShow=2000; //提示层的渐渐消失时间 3 showPopStep=90; 4 popOpacity=90;//提示层的透明度 5 6 sPop=null; 7 curShow=null; 8 tFadeOut=null; 9 tFadeIn=null; 10 tFadeWaiting=null; 11 12 document.write(""); 13 document.write(" "); 14 15 function showPopupText(){ 16 var o=event.srcElement; 17 MouseX=event.x; 18 MouseY=event.y; 19 if(o.alt!=null && o.alt!=""){ o.dypop=o.alt;o.alt=""}; 20 if(o.title!=null && o.title!=""){ o.dypop=o.title;o.title=""}; 21 if(o.dypop!=sPop){ 22 sPop=o.dypop; 23 clearTimeout(curShow); 24 clearTimeout(tFadeOut); 25 clearTimeout(tFadeIn); 26 clearTimeout(tFadeWaiting); 27 if(sPop==null || sPop==""){ 28 dypopLayer.innerHTML=""; 29 dypopLayer.style.filter="Alpha()"; 30 dypopLayer.filters.Alpha.opacity=0; 31 }else{ 32 if(o.dyclass!=null) popStyle=o.dyclass 33 else popStyle="cPopText"; 34 curShow=setTimeout("showIt()",tPopWait); 35 } 36 } 37 } 38 39 function showIt(){ 40 dypopLayer.className=popStyle; 41 dypopLayer.innerHTML=sPop; 42 popWidth=dypopLayer.clientWidth; 43 popHeight=dypopLayer.clientHeight; 44 if(MouseX+2+popWidth>document.body.clientWidth) popLeftAdjust=1 45 else popLeftAdjust=0; 46 if(MouseY+2+popHeight>document.body.clientHeight) popTopAdjust=1 47 else popTopAdjust=0; 48 dypopLayer.style.left=MouseX+6+document.body.scrollLeft+popLeftAdjust; 49 dypopLayer.style.top=MouseY+6+document.body.scrollTop+popTopAdjust; 50 dypopLayer.style.filter="Alpha(Opacity=0)"; 51 fadeOut(); 52 } 53 54 function fadeOut(){ 55 if(dypopLayer.filters.Alpha.opacity0){ 66 dypopLayer.filters.Alpha.opacity-=1; 67 tFadeIn=setTimeout("fadeIn()",1); 68 } 69 } 70 document.οnmοuseοver=showPopupText;