28,391
社区成员
发帖
与我相关
我的任务
分享
document.write("<style type='text/css'>#Tag {display:block;font:12px Tahoma,Verdana;background-color:#FFFFE1;border:1px #000 solid;padding:3px;position:absolute;z-index:1000;visibility:hidden;color:#000000;text-align:left;}</style>");
document.write("<tt id='Tag' style='filter:blendtrans(duration=.2) revealTrans(duration=.1,transition=12) alpha(opacity=100,enabled=0);-moz-opacity:0.9'></tt>");
var sPop = null;
function ShowTag(e){
if(e){o=e.target;MouseX=e.pageX;MouseY=e.pageY} else{o=event.srcElement;MouseX=event.x;MouseY=event.y}
if(o.alt){o.pop=o.alt;o.alt="";} if(o.title){o.pop=o.title;o.title="";} if(o.pop){o.pop=o.pop.replace(/\n/g,"<br />");}
if(o.pop!=sPop){sPop=o.pop;if(sPop){
obj=(document.all)? Tag : document.getElementById("Tag");
obj.innerHTML=o.pop;iebody=document.body;
objWidth=obj.offsetWidth;objHeight=obj.offsetHeight;
popLeftAdjust=(MouseX+12+objWidth>iebody.clientWidth)?(-objWidth-24):0;
popTopAdjust=(MouseY+12+objHeight>iebody.clientHeight)?(-objHeight-24):0;
obj.style.left=MouseX+12+iebody.scrollLeft+popLeftAdjust;
obj.style.top=MouseY+12+iebody.scrollTop+popTopAdjust;
if(obj.filters && obj.filters.length!=0){obj.filters[1].apply();obj.style.visibility="visible";obj.filters[1].play()} else obj.style.visibility="visible";}
else{if(obj.filters && obj.filters.length!=0){obj.filters[0].apply();obj.style.visibility="hidden";obj.filters[0].play()} else obj.style.visibility="hidden";}
}}
document.onmouseover=ShowTag;
<script src="alt.js"></script>
<a title="<img src='http://www.baidu.com/img/baidu_logo.gif'>" href="#">baidu</a>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
a.info
{
position:relative;
z-index:0;
background-color:#ccc;
color:#000;
text-decoration:none;
}
a.info:hover { z-index:1; background-color:#ff0; }
a.info span { display: none; }
a.info:hover span
{
display:block;
position:absolute;
top:5px;
left:500px;
width:130px;
border:1px solid #0cf;
background-color:#FFFFFF;
color:#000;
text-align: center;
}
</style>
</head>
<body>
<a class="info" href="http://www.5x-space.cn">无限空间Blog<span><img src="http://www.5x-space.cn/themes/Bolg/Images/logo_01.jpg" border="0"></span></a>
</body>
</html>