本帖最后由 constance2098 于 2012-08-14 15:28:36 编辑

解决方案 »

  1.   

    firefox,ie7,ie8没出错的飘过。。
      

  2.   

    <html>
    <head>
    <script type="text/javascript" src="file:///F|/workspace/jquery-1.4.2.js"></script>
    <script type="text/javascript">
    function div(id){return document.getElementById(id);}
    var ie=!-[1,];
    var Obj={
     Create:function(id,id2,ele){
     var obj=document.createElement(ele);
      obj.setAttribute("id",id2);
      div(id).appendChild(obj);
      },
     del:function(id){
      var obj=div(id);
    obj.parentNode.removeChild(obj);
      
      },
     inner:function(id,text){
      div(id).innerHTML=text;
      },
     css:function(){
      this.cssinfo();
      var obj=div(this.css.id);
      with(obj.style){
      ie?(this.css.float!=undefined?styleFloat=this.css.float:""):(this.css.float!=undefined?cssFloat=this.css.float:"");
      this.css.background!=undefined?background=this.css.background:"";
      this.css.width!=undefined?width=this.css.width:"";
      this.css.height!=undefined?height=this.css.height:"";
      this.css.position!=undefined?position=this.css.position:"";
      this.css.left!=undefined?left=this.css.left:"";
      this.css.top!=undefined?top=this.css.top:"";
      this.css.bottom!=undefined?bottom=this.css.bottom:"";
      this.css.padding!=undefined?padding=this.css.padding:"";
      this.css.margin!=undefined?margin=this.css.margin:"";
      this.css.filter!=undefined?filter=this.css.filter:"";
      this.css.opacity!=undefined?opacity=this.css.opacity:"";
      this.css.zIndex!=undefined?zIndex=this.css.zIndex:"";
      this.css.border!=undefined?border=this.css.border:"";
      this.css.overflow!=undefined?overflow=this.css.overflow:"";
      this.css.display!=undefined?display=this.css.display:"";
      this.css.textAlign!=undefined?textAlign=this.css.textAlign:"";
      this.css.fontSize!=undefined?fontSize=this.css.fontSize:"";
      this.css.color!=undefined?color=this.css.color:"";
      this.css.verticalAlign!=undefined?verticalAlign=this.css.verticalAlign:"";
      this.css.cursor!=undefined?cursor=this.css.cursor:"";
      this.css.lineHeight!=undefined?lineHeight=this.css.lineHeight:"";
      }
      },
     oEventX:function(e){
      var e=window.event?window.event:e;
      return e.clientX;
     },
     oEventY:function(e){
      var e=window.event?window.event:e;
      return e.clientY;
     }
    }
    var Create=Obj.Create,inner=Obj.inner,del=Obj.del,oX=Obj.oEventX,oY=Obj.oEventY;
    Obj.css.prototype.cssinfo=function(){
     this.css=css;
     return this;
    }
    </script>
    <style>
    *{margin:0;padding:0;}
    body,td{font-size:12px;font-family:"宋体";color: #666;line-height:24px;}
    a:link {
    text-decoration: none;
    color: #666;
    }
    a:visited {
    text-decoration: none;
    color: #666;
    }
    a:hover {
    text-decoration: none;
    color: #B80501;
    }
    a:active {
    text-decoration: none;
    }
    </style>
    </head>
    <body id="body" style="background-color: #FFFFFF">
    <div class="body">
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td height="25" width="2%">
     &#8226;</td>
    <td height="25" width="85%" valign="bottom"><a href='#' title='title:学校召开假期工作情况调度推进会;anthor:xcb;more:xcb;' target='_blank' class='titleshow'>学校召开假期工作情况调度推进会</a></td>
    <td height="25" width="13%" valign="bottom">2012-8-14</td>
    </tr>
    <tr>
    <td height="25" width="2%">
     &#8226;</td>
    <td height="25" width="85%" valign="bottom"><a href='#' title='title:学校召开假期工作情况调度推进会;anthor:xcb;more:xcb;' target='_blank' class='titleshow'>学校召开假期工作情况调度推进会</a></td>
    <td height="25" width="13%" valign="bottom">2012-8-14</td>
    </tr>
    <tr>
    <td height="25" width="2%">
     &#8226;</td>
    <td height="25" width="85%" valign="bottom"><a href='#' title='title:学校召开假期工作情况调度推进会;anthor:xcb;more:xcb;' target='_blank' class='titleshow'>学校召开假期工作情况调度推进会</a></td>
    <td height="25" width="13%" valign="bottom">2012-8-14</td>
    </tr>
    <tr>
    <td height="25" width="2%">
     &#8226;</td>
    <td height="25" width="85%" valign="bottom"><a href='#' title='title:学校召开假期工作情况调度推进会;anthor:xcb;more:xcb;' target='_blank' class='titleshow'>学校召开假期工作情况调度推进会</a></td>
    <td height="25" width="13%" valign="bottom">2012-8-14</td>
    </tr>
    <tr>
    <td height="25" width="2%">
     &#8226;</td>
    <td height="25" width="85%" valign="bottom"><a href='#' title='title:学校召开假期工作情况调度推进会;anthor:xcb;more:xcb;' target='_blank' class='titleshow'>学校召开假期工作情况调度推进会</a></td>
    <td height="25" width="13%" valign="bottom">2012-8-14</td>
    </tr>
    <tr>
    <td height="25" width="2%">
     &#8226;</td>
    <td height="25" width="85%" valign="bottom"><a href='#' title='title:学校召开假期工作情况调度推进会;anthor:xcb;more:xcb;' target='_blank' class='titleshow'>学校召开假期工作情况调度推进会</a></td>
    <td height="25" width="13%" valign="bottom">2012-8-14</td>
    </tr>
    </table></div></body></html>
    <script>
    function tshow(){
     var eles=document.getElementsByTagName("a");
     for(var i=0;i<eles.length;i++){
      if(eles[i].className=="titleshow"){
      eles[i].onmouseover=function(){
      tSite(arguments[0]);
      tcut(this.title);
      this.t=this.title;
      this.title="";
      };
      eles[i].onmouseout=function(){
      setTimeout(function() {
      del("tShow_wrap");
     },100); 
      
      this.title=this.t;
      }
       }
     }
    }
    function tcut(c){
     var strs=c.split(";");
     for(var i=0;i<strs.length-1;i++){
      tStart(strs[i]);
     }
    }
    function tStart(c){
     var n1=c.indexOf(":");
     var label=c.substring(0,n1),txt=c.slice(n1+1);
     switch(label){
      case "title":this.title=txt;break;
      case "anthor":this.anthor=txt;break;
      case "more":this.more=txt;break;
     }
     if(this.more!=undefined){
      var text="<dl id='tShow_add'>\n\
      <dt style='line-height:16px;font-weight:bold;'>"+this.title+"</dt>\n\
      </dl>";
      div("tShow_wrap").innerHTML=text;
      css={id:"tShow_add",border:"1px solid #b80403",background:"#fff",padding:"4px",color:"#000",lineHeight:"20px",width:"220px"}
      new Obj.css;
     }
    }
    function tSite(e){
     Create("body","tShow_wrap","div");
     css={id:"tShow_wrap",position:"absolute",top:oY(e)-10+"px",left:oX(e)+20+"px"}
     new Obj.css;
    }tshow();
    </script>
      

  3.   

    <script type="text/javascript" src="file:///F|/workspace/jquery-1.4.2.js"></script>有附件吗?
      

  4.   

    setTimeout(function() {
    del("tShow_wrap");
    },100); 100短点了,我试了试2000正好。谢谢楼上的兄弟。
      

  5.   

    可能是飘过的速度太快了  加一个判断吧del:function(id){
      var obj=div(id);
      if(obj){
      obj.parentNode.removeChild(obj);
      }
    },