博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
alt和title的提示层
阅读量:7174 次
发布时间:2019-06-29

本文共 1989 字,大约阅读时间需要 6 分钟。

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.opacity
0){
66 dypopLayer.filters.Alpha.opacity-=1; 67 tFadeIn=setTimeout("fadeIn()",1); 68 } 69 } 70 document.οnmοuseοver=showPopupText;

 

转载于:https://www.cnblogs.com/huangxiang/archive/2012/01/17/2324788.html

你可能感兴趣的文章
初探Java设计模式4:JDK中的设计模式
查看>>
漫谈promise使用场景
查看>>
Design Pattern的万剑归宗 => Mediator
查看>>
Javascript中的原型继承的一些看法与见解
查看>>
HackerRank:JavaScript 是最知名的编程语言
查看>>
Linux修改本地时间
查看>>
elasticsearch字符串包含查询
查看>>
5- Flask构建弹幕微电影网站-项目分析、搭建目录及模型设计
查看>>
Mysql四种常见数据库引擎
查看>>
《Kotin 极简教程》第7章 面向对象编程(OOP)(1)
查看>>
Chrome吃内存的能力可不是说着玩的!
查看>>
IntelliJ IDEA 详细图解最常用的配置 ,适合刚刚用的新人
查看>>
[20180619]fsc表示什么.txt
查看>>
域名对SEO的影响大吗?
查看>>
7年苦心钻研自动驾驶,最终Alphabet选择削减投入
查看>>
农民伯伯的福利到了,AR技术让种地更加easy
查看>>
4年后,nuTonomy要在10城市运行无人驾驶车
查看>>
李开复预言:人工智能将在10年后让50%的人失业
查看>>
iStaing获500万美元投资,VR室内设计离我们还远吗?
查看>>
JFinal结合Sigar、echarts实现后台服务器监控
查看>>