关闭

鼠标划过显示内容

768人阅读 评论(0) 收藏 举报

<html>
<head>
 <title></title>
 <!--公共Style-->
 <style text="text/css">
 td{
 font-size:12px;
}

#hint
{
 position:absolute;
 width:350;
 height:50;
 background-color:#F6F6F6;
 visibility:hidden;
 border:1px solid #94B5EB;
 padding:5;
 FILTER:progid:DXImageTransform.Microsoft.dropShadow( Color=gray,offX=3,offY=3,positive=true);
}
.filter_fade
{
 height:20;
 FILTER: progid:DXImageTransform.Microsoft.Fade(Overlap=0.1);
}
 </style>

<!--公共Script-->
    <script language="javascript" >
//Get Position
function getPosition(obj)
{
 var x,y;
 var coordinates=new Object();
 var tmp_obj=obj;
 x=0;
 y=0;
 while(tmp_obj.nodeName!="BODY")
 {
   x+=tmp_obj.offsetLeft;
   y+=tmp_obj.offsetTop;
   if (tmp_obj.nodeName=="DIV")
   {
  x-=tmp_obj.scrollLeft;
  y-=tmp_obj.scrollTop;
   }
   tmp_obj=tmp_obj.offsetParent;
 }
 coordinates.x=x;
 coordinates.y=y;
 return coordinates;
}
//Show Hint
function showHint(x,y,s)
{
 var hint=document.all.hint;
 var xBody=document.body.clientWidth+document.body.scrollLeft-hint.offsetWidth-30
 x=(x>xBody)?xBody:x
 
 //var yBody=document.body.clientHeight+document.body.scrollTop-hint.offsetHeight
 //y=(y>yBody)?yBody:y
 
 hint.style.left=x;
 hint.style.top=y;
 if(hint.filters[0]){hint.filters[0].apply()}
 hint.innerHTML=s;
 hint.style.visibility='visible';
 if(hint.filters[0]){hint.filters[0].play()}
}
//Hide Hint
function hideHint()
{
 var hint=document.all.hint;
 if(hint.filters[0]){hint.filters[0].apply()}
 //document.all.hint.innerHTML='';
 document.all.hint.style.visibility='hidden';
 if(hint.filters[0]){hint.filters[0].play()}
}
function hintFollowMouse()
{
 var hint=document.all.hint;
 var x=event.x
 var xBody=document.body.clientWidth+document.body.scrollLeft-hint.offsetWidth
 x=(x>xBody)?xBody:x
 
 var y=event.y+document.body.scrollTop
 var yBody=document.body.clientHeight+document.body.scrollTop-hint.offsetHeight
 y=(y>yBody)?yBody:y
 
 hint.style.left=x;
 hint.style.top=y+20;
}
</script>
 
 <script language="javascript">
 function showSumary(obj,s)
 {
  var pos=getPosition(obj);
  showHint(event.x,event.y+20,s);
  //obj.parentElement.runtimeStyle.backgroundColor='#e5e5e5';
 }
 function hideSumary(obj)
 {
       hideHint();
        obj.parentElement.runtimeStyle.backgroundColor=obj.parentElement.style.backgroundColor;
 } 
</script>

</head>
</td>
<div id="hint" class="filter_fade" style="width:450px;" onmousemove="this.style.visibility='visible';" onmouseout="this.style.visibility='hidden';">.</div>
<td valign="top">
<table width="100%">
<tr>
<td width="100px" onmousemove="hintFollowMouse()" onmouseout="hideSumary(this);" onmouseover="showSumary(this,document.all.dvFundManagerIDAQRCL.innerHTML)">test<img src="/images/arrow.gif" alt=""></td>
<td width="5%">dddd</td>
<td width="10%">ssss</td>
<td width="60%">eeeee</td>
<td>

<div style="display:none" id="dvFundManagerIDAQRCL">
<table>
<tr>加粗
<td>上策市电风扇的撒达到撒旦大苏打士<br/>换行大夫<b>加粗撒反对法</b>
扇的撒达到撒旦大苏打士扇的撒达到撒旦大苏打<br/>士扇的撒达<br/>到撒旦大苏打士</td>
</tr>
</table>
</div></td>
</tr>
</table>
 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:74409次
    • 积分:1122
    • 等级:
    • 排名:千里之外
    • 原创:34篇
    • 转载:20篇
    • 译文:0篇
    • 评论:18条
    最新评论