- 功勋
- 0 点
- 积分
- 3
- 阅读权限
- 10
- 精华
- 0
- UID
- 458311
- 帖子
- 8
- 威望
- 0 点
- 黄金
- 4 金币
- 在线时间
- 9 小时
- 注册时间
- 2008-3-2
- 最后登录
- 2010-11-24

- UID
- 458311
- 帖子
- 8
- 威望
- 0 点
- 黄金
- 4 金币
- 在线时间
- 9 小时
- 注册时间
- 2008-3-2
- 最后登录
- 2010-11-24
|
发表于 2008-3-17 22:00:15
|显示全部楼层
style type="text/css">
<!--
#ToolTip{position:absolute; width: 100px; top: 100px; left: 100px; z-index:4; visibility:hidden;}
-->
</style>
<script language = "JavaScript">
<!--
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0
if(ns){doc = "document."; sty = ""}
if(ie){doc = "document.all."; sty = ".style"}
var initialize = 0
var Ex, Ey, topColor, subColor, ContentInfo
if(ie){
Ex = "event.x"
Ey = "event.y"
topColor = "#808080"
subColor = "#C0C0C0"
}
if(ns){
Ex = "e.pageX"
Ey = "e.pageY"
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=overhere
topColor = "#808080"
subColor = "#C0C0C0"
}
function MoveToolTip(layerName, FromTop, FromLeft, e){
if(ie){eval(doc + layerName + sty + ".top = " + (eval(FromTop) + document.body.scrollTop))}
if(ns){eval(doc + layerName + sty + ".top = " + eval(FromTop))}
eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 15))
}
function ReplaceContent(layerName){
if(ie){document.all[layerName].innerHTML = ContentInfo}
if(ns){
with(document.layers[layerName].document)
{
open();
write(ContentInfo);
close();
}
}
}
function Activate(){initialize=1}
function deActivate(){initialize=0}
function overhere(e){
if(initialize && ie){
MoveToolTip("ToolTip", Ey, Ex, e)
eval(doc + "ToolTip" + sty + ".visibility = 'visible'")
}
else{
MoveToolTip("ToolTip", 0, 0)
eval(doc + "ToolTip" + sty + ".visibility = 'hidden'")
}
}
function EnterContent(TTitle, TContent){
if(ie){
window.document.tooltip.SetVariable("tooltiptitle", TTitle);
window.document.tooltip.SetVariable("tooltipcontent", TContent);
}
}
//-->
</script> |
|