IT技术江湖   操作系统   安全技术   平面设计   Web开发   数据库   互联网   搜索引擎   网络广告   
引擎技术江湖  BLOG  合作联系
本站
Google
IT技术江湖
首页>Web开发>JavaScript特效> 特效代码:非常漂亮的鼠标提示的信息
  • IT技术江湖
  • 特效代码:非常漂亮的鼠标提示的信息
    http://www.hack1st.com 来源: 2008-03-20 阅读: 评论

     非常漂亮的鼠标提示的信息

    <style>
    .tableBorder7{width:800;solid; background-color: #000000;}
    TD{font-family: 宋体;font-size: 12px;line-height : 15px ;}
    th{background-color: #f7f7f7;color: #000000;font-size: 12px;font-weight:bold;}
    th.th1{background-color: #333333;}
    td.TableBody7{background-color: #B1EA45;}
    </style>
    <script language="JavaScript">
    //more javascript from
    http://www.webjx.com
    <!--
    var pltsPop=null;
    var pltsoffsetX = 10;  // 弹出窗口位于鼠标左侧或者右侧的距离;3-12 合适
    var pltsoffsetY = 15; // 弹出窗口位于鼠标下方的距离;3-12 合适
    var pltsPopbg="#FFFFEE"; //背景色
    var pltsPopfg="#111111"; //前景色
    var pltsTitle="";
    document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>');
    function pltsinits()
    {
      document.onmouseover  = plts;
      document.onmousemove = moveToMouseLoc;
    }
    function plts()
    { var o=event.srcElement;
      if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
      if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
      pltsPop=o.dypop;
      if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined")
      {
        pltsTipLayer.style.left=-1000;
        pltsTipLayer.style.display='';
        var Msg=pltsPop.replace(/ /g,"<br>");
        Msg=Msg.replace(/x13/g,"<br>");
        var re=/{(.[^{]*)}/ig;
        if(!re.test(Msg))pltsTitle="<font color=#ffffff>简介</font>";
        else{
         re=/{(.[^{]*)}(.*)/ig;
          pltsTitle=Msg.replace(re,"$1")+" ";
         re=/{(.[^{]*)}/ig;
         Msg=Msg.replace(re,"");
         Msg=Msg.replace("<br>","");}
         //var attr=(document.location.toString().toLowerCase().indexOf("list.asp")>0?"nowrap":"");
           var content =
           '<table style="FILTER:alpha(opacity=90) shadow(color=#bbbbbb,direction=135);" id=toolTipTalbe border=0><tr><td width="100%"><table class=tableBorder7 cellspacing="1" cellpadding="0" style="width:100%">'+
           '<tr id=pltsPoptop ><th height=18 valign=bottom class=th1 ><b><p id=topleft align=left><font color=#ffffff>↖</font>'+pltsTitle+'</p><p id=topright align=right style="display:none">'+pltsTitle+'<font color=#ffffff>↗</font></b></th></tr>'+
           '<tr><td "+attr+" class=tablebody7 style="padding-left:14px;padding-right:14px;padding-top: 6px;padding-bottom:6px;line-height:135%">'+Msg+'</td></tr>'+
           '<tr id=pltsPopbot style="display:none"><th height=18 valign=bottom class=th1><b><p id=botleft align=left><font color=#ffffff>↙</font>'+pltsTitle+'</p><p id=botright align=right style="display:none">'+pltsTitle+'<font color=#ffffff>↘</font></b></th></tr>'+
           '</table></td></tr></table>';
           pltsTipLayer.innerHTML=content;
           toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2);
           moveToMouseLoc();
           return true;
        }
      else
      {
          pltsTipLayer.innerHTML='';
           pltsTipLayer.style.display='none';
           return true;
      }
    }
    function moveToMouseLoc()
    {
        if(pltsTipLayer.innerHTML=='')return true;
        var MouseX=event.x;
        var MouseY=event.y;
        //window.status=event.y;
        var popHeight=pltsTipLayer.clientHeight;
        var popWidth=pltsTipLayer.clientWidth;
        if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight)
        {
            popTopAdjust=-popHeight-pltsoffsetY*1.5;
            pltsPoptop.style.display="none";
            pltsPopbot.style.display="";
        }
        else
        {
             popTopAdjust=0;
            pltsPoptop.style.display="";
            pltsPopbot.style.display="none";
        }
        if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth)
        {
           popLeftAdjust=-popWidth-pltsoffsetX*2;
           topleft.style.display="none";

    上一页12 下一页

    上一篇:在IE浏览器中正确显示PNG透明图片  
    下一篇:距离北京2008年奥运会开幕的倒记时特效

    ·网友互动--用户名: (新注册) 密码: 匿名评论 [所有评论]
    评论内容:(用户发表意见仅代表其个人意见,评论内容与本站立场无关,请自觉遵守互联网相关政策法规)
    关注此文读者还看过
    • ·用Javascript实现表格单元格背景色鼠标响应
      ·编程实例 一个简单的智能感知效果
      ·排序Select中Option项的一个示例
      ·JavaScript技巧:让网页自动穿上外套
      ·用JavaScript/JS制作仿“QQ秀”的虚拟形象
      ·防止查看源代码的网页特效
      ·循环不间断向上滚动的文本特效代码
      ·鼠标单击连接在网页中弹出个性提示小窗口
      ·Javascript强制设为首页的网页代码
      ·网页表单禁止输入某些符号的简单实现方法
    最新更新
    • ·用Javascript实现表格单元格背景色鼠标响应
      ·编程实例 一个简单的智能感知效果
      ·排序Select中Option项的一个示例
      ·JavaScript技巧:让网页自动穿上外套
      ·用JavaScript/JS制作仿“QQ秀”的虚拟形象
      ·防止查看源代码的网页特效
      ·循环不间断向上滚动的文本特效代码
      ·鼠标单击连接在网页中弹出个性提示小窗口
      ·Javascript强制设为首页的网页代码
      ·网页表单禁止输入某些符号的简单实现方法
    文章关注度排行
    ·鼠标单击连接在网页中弹出个性提示小窗口
    ·用JavaScript/JS制作仿“QQ秀”的虚拟形象
    ·特效代码:非常漂亮的鼠标提示的信息
    ·Javascript强制设为首页的网页代码
    ·排序Select中Option项的一个示例
    ·循环不间断向上滚动的文本特效代码
    ·用JavaScript刷新框架子页面的方法
    ·在IE浏览器中正确显示PNG透明图片
    热点推荐
    特效代码:非常漂亮的鼠标提示的信息
    特效代码:非常漂亮的鼠
    距离北京2008年奥运会开幕的倒记时特效
    距离北京2008年奥运会开
    频道推荐
    • ·鼠标单击连接在网页中弹出个性提示小窗口
    • ·特效代码:非常漂亮的鼠标提示的信息
    • ·Javascript强制设为首页的网页代码
    • ·循环不间断向上滚动的文本特效代码
    • ·网页表单禁止输入某些符号的简单实现方法
    • ·防止查看源代码的网页特效
    • ·距离北京2008年奥运会开幕的倒记时特效
    • ·推荐几个入门级的JS特效代码
    本站精华
    特效代码:非常漂亮的鼠标提示的信息
    特效代码:非
    距离北京2008年奥运会开幕的倒记时特效
    距离北京2008
    • ·防止查看源代码的网页特效
    • ·循环不间断向上滚动的文本特效
    • ·鼠标单击连接在网页中弹出个性
    • ·Javascript强制设为首页的网页
    • ·网页表单禁止输入某些符号的简
    • ·距离北京2008年奥运会开幕的倒
    • | 网站导航 | 联系QQ | 编辑邮箱 | RSS订阅 | 友情链接 | 官方blog
    • 版权所有:IT技术江湖 @2007-2008
    • powered by www.hack1st.com online services. all rights reserved.京ICP备07005766号