| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1228 人关注过本帖
标题:当光标移动到链接文字上时,如果能让它在光标处显示的一条提示信息加速显示 ...
只看楼主 加入收藏
shuimei262
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-1-16
收藏
 问题点数:0 回复次数:4 
当光标移动到链接文字上时,如果能让它在光标处显示的一条提示信息加速显示?
当光标移动到链接文字上时,如果能让它在光标处显示的一条提示信息加速显示
如:
<a href="#" title="这是提示信息">啊</a>
这里提示的信息 “这是提示信息” 会等鼠标放上去一会才出现 怎么让他立即显示??

QQ 47121862 谢谢赐教
搜索更多相关主题的帖子: 光标 提示 链接 文字 
2008-04-04 23:56
永夜的极光
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2721
专家分:1
注 册:2007-10-9
收藏
得分:0 
这个估计有难度。。。

从BFS(Breadth First Study)到DFS(Depth First Study)
2008-04-05 00:11
shuimei262
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-1-16
收藏
得分:0 
http://www.
我看 这个熊猫的个人网站上 是这样的 我以为能实现捏 可能他用的JS或者别的实现的吧``
2008-04-05 00:13
永夜的极光
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2721
专家分:1
注 册:2007-10-9
收藏
得分:0 
我帮你把那段实现的方法分离出来了,将以下代码保存为1.html,然后在浏览器中打开,就可以看到效果了
程序代码:
<script language="JavaScript">
//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {  background-color: #F8F8F5;color:#000000; border: 1px #000000 

solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; 

padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' 

class='cPopText'></div>");


function showPopupText(){
var o=event.srcElement;
    MouseX=event.x;
    MouseY=event.y;
    if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
        if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
    if(o.dypop!=sPop) {
            sPop=o.dypop;
            clearTimeout(curShow);
            clearTimeout(tFadeOut);
            clearTimeout(tFadeIn);
            clearTimeout(tFadeWaiting);    
            if(sPop==null || sPop=="") {
                dypopLayer.innerHTML="";
                dypopLayer.style.filter="Alpha()";
                dypopLayer.filters.Alpha.opacity=0;    
                }
            else {
                if(o.dyclass!=null) popStyle=o.dyclass 
                    else popStyle="cPopText";
                curShow=setTimeout("showIt()",tPopWait);
            }
            
    }
}

function showIt(){
        dypopLayer.className=popStyle;
        dypopLayer.innerHTML=sPop;
        popWidth=dypopLayer.clientWidth;
        popHeight=dypopLayer.clientHeight;
        if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
            else popLeftAdjust=0;
        if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-

24
            else popTopAdjust=0;
        dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
        dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
        dypopLayer.style.filter="Alpha(Opacity=0)";
        fadeOut();
}

function fadeOut(){
    if(dypopLayer.filters.Alpha.opacity<popOpacity) {
        dypopLayer.filters.Alpha.opacity+=showPopStep;
        tFadeOut=setTimeout("fadeOut()",1);
        }
        else {
            dypopLayer.filters.Alpha.opacity=popOpacity;
            tFadeWaiting=setTimeout("fadeIn()",tPopShow);
            }
}

function fadeIn(){
    if(dypopLayer.filters.Alpha.opacity>0) {
        dypopLayer.filters.Alpha.opacity-=1;
        tFadeIn=setTimeout("fadeIn()",1);
        }
}
document.onmouseover=showPopupText;
</script>
<A title="" href="list_wz.asp?id=840" target=_blank dypop="这个是利用js实现的 <br>弹出来的其

实是一个div <br>div的内容是这个引号内的html语句 <br>还可以控制弹出和停留的时间">快速弹出的提

示信息</A>

从BFS(Breadth First Study)到DFS(Depth First Study)
2008-04-05 08:42
shuimei262
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-1-16
收藏
得分:0 
真是太谢谢了 呵呵!!!!!!
2008-04-07 00:34
快速回复:当光标移动到链接文字上时,如果能让它在光标处显示的一条提示信息加速 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014744 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved