标题:title提示的问题
只看楼主
adleyliu
Rank: 1
等 级:新手上路
帖 子:146
专家分:0
注 册:2005-5-8
 问题点数:0 回复次数:0 
title提示的问题

ti




为什么提示框位置不固定?


代码如下:

document.write("<style type='text/css'>#Tag {display:block;font:12px Tahoma,Verdana;background-color:#FFC;border:1px #000 solid;padding:3px;position:absolute;z-index:1000;visibility:hidden}</style>");
document.write("<tt id='Tag' style='filter:blendtrans(duration=.2) revealTrans(duration=.1,transition=12) alpha(opacity=90,enabled=1);-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;


搜索更多相关主题的帖子: title 提示 
2007-01-23 11:55



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-117639-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018710 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved