• ToolTip特效 JavaScript 盗取厦门人才网的特效


    原文发布时间为:2009-05-17 —— 来源于本人的百度文章 [由搬家工具导入]

    源代码:http://www.xmaspx.com/Services/FileAttachment.ashx?AttachmentID=43

    <html>
    <head>
    <title>笑傲心扬百度空间</title>
    <script type="text/javascript">
    window.onerror=new Function("return true");

    if (document.all)
    {

    document.write("<div id=tip style='position:absolute; 210px; z-index:1;

    background-color: #7D84B9; border: 1px solid gray; overflow: visible;visibility: hidden;font-

    size:12px;padding:12px;color:#ffffff'></div>")
    }
    else
    {
    if (document.layers)
    {
       document.write("<layer id=tip visibility='hide' bgcolor='#7D84B9'></layer>")
    }
    else
    {
       document.write("<div id=tip style='position:absolute; 230px; z-index:1;

    background-color: #7D84B9; border: 1px solid gray; overflow: visible;visibility: hidden;font-

    size:12px;padding:12px;color:#ffffff'></div>")
    }
    }

    var posx=0;
    var posy=0;

    document.onmousemove = mouseMove;
    function mouseMove(ev){
    ev = ev || window.event;
    var mousePos = mouseCoords(ev);
    posx = mousePos.x;
    posy = mousePos.y;
    }

    function mouseCoords(ev){
    if(ev.pageX || ev.pageY){
    return {x:ev.pageX, y:ev.pageY};
    }
    return {
    x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
    y:ev.clientY + document.body.scrollTop - document.body.clientTop
    };
    }

    document.onmousedown = mouseDown;
    function mouseDown(ev){
    ev         = ev || window.event;
    var target = ev.target || ev.srcElement;

    if(target.onmousedown || target.getAttribute('DragObj')){
       return false;
    }
    }

    function showalt(w){
    if (w=="")return;
    var dv = document.getElementById("tip");
    dv.innerHTML=w + "<br>";
    if (document.all)
    {
       dv.style.visibility="visible";
       dv.style.left=posx+10;       // event.x+10+document.body.scrollLeft;
       dv.style.pixelTop=posy+10;   // event.y+10+document.body.scrollTop;
    }
    else
    {
       if (document.layers)
       {
        dv.visibility="show";
        dv.left=posx+10;
        dv.top=posy+10;
       }
       else
       {
        dv.style.visibility="visible";
        dv.style.left= posx+10 ;
        dv.style.top= posy+10 ;   
       }
    }
    }
    function hidealt(){
    var dv = document.getElementById("tip");
    dv.style.innerHTML=""
    if (document.all)
    {
       dv.style.visibility="hidden";
    }
    else
    {
       if (document.layers)
       {
        dv.visibility="hide";
       }
       else
       {
        dv.style.visibility="hidden";
       }
    }
    }
    </script>
    </head>
    <body>
    <a href = "http://hi.baidu.com/handboy" onmousemove='showalt("点击进入我的百度空间

    <br/>http://hi.baidu.com/handboy")' onmouseout='hidealt()'>笑傲心扬的百度空间</a></p>
    </body>
    </html>

  • 相关阅读:
    Linux 设置主机名和 IP 地址的映射关系
    Zookeeper 数据查看工具 ZooInspector 的使用
    Zookeeper 集群
    Zookeeper 监控指定节点数据变化
    Zookeeper 常用命令
    Spring整合ActiveMQ持久化到Mysql数据库
    Activemq5.15.5持久化到mysql8.0.20
    ActiveMQ支持的协议
    SIGINT SIGTERM SIGKILL区别
    lograte -日志轮询log
  • 原文地址:https://www.cnblogs.com/handboy/p/7153294.html
Copyright © 2020-2023  润新知