<html>
<头>
<脚本语言=“javascript”>
var 提示定时器;
函数locateObject(n, d) { //v3.0
var p,i,x; if(!d) d=文档; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++) x= locateObject(n,d.layers[i].document);返回x;
}
函数隐藏工具提示(对象)
{
if (文档.全部)
{
locateObject(对象).style.visibility =“隐藏”
locateObject(object).style.left = 1;
locateObject(object).style.top = 1;
返回错误
}
else if (文档.层)
{
locateObject(对象).visibility="隐藏"
locateObject(对象).left = 1;
locateObject(对象).top = 1;
返回错误
}
别的
返回真
}
函数showTooltip(对象,e,提示内容,背景色,边框颜色,文本颜色,显示时间)
{
window.clearTimeout(tipTimer)
if (文档.全部)
{
locateObject(object).style.top=document.body.scrollTop+event.clientY+20
locateObject(object).innerHTML='<table style="font-family: Verdana、Tahoma、Arial、Helvetica、sans-serif;字体大小:11px;边框:'+bordercolor+';边框样式:solid;边框-顶部宽度:1px;边框底部宽度:1px;背景颜色:'+backcolor+'" width="10" border="0" cellspacing ="1" cellpadding="1"><tr><td nowrap><font style="font-family: Verdana、Tahoma、Arial、Helvetica、sans-serif;字体大小:11px;颜色:'+textcolor+' ">'+unescape(tipContent)+'</font></td></tr></table> '
if ((ex +locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
{
locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) -locateObject(object).clientWidth-10;
}
别的
{
locateObject(object).style.left=document.body.scrollLeft+event.clientX
}
locateObject(对象).style.visibility =“可见”
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
返回真;
}
else if (文档.层)
{
locateObject(object).document.write('<table width="10" border="0" cellspacing="1" cellpadding="1"><tr bgcolor="'+bordercolor+'"><td><表格宽度="10" border="0" cellspacing="0" cellpadding="2"><tr bgcolor="'+backcolor+'"><td nowrap><font style="font-family: Verdana、Tahoma、Arial、 Helvetica,无衬线;字体大小:11px;颜色:'+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table></td></ tr></table>')
locateObject(对象).document.close()
locateObject(对象).top=e.y+20
if ((ex +locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth))
{
locateObject(object).left = window.innerWidth -locateObject(object).clip.width-10;
}
别的
{
locateObject(对象).left=ex;
}
locateObject(对象).visibility="显示"
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
返回真;
}
别的
{
返回真;
}
}
</脚本>
</头>
<正文>
<div id="dHTMLToolTip" style="position:absolute;visibility:hidden;width:10;height:10;z-index:1000;left:0;top:0"></div>
<span onMouseOver="showTooltip('dHTMLToolTip',event, '文字提示信息部分<br><img src=http://feeds2.feedburner.com/~fc/dlstu?bg=99CCFF&fg=2C689B&anim=0><br >大家好啊。。', '#fffff2','#000000','#000000','20000')" onMouseOut="hideTooltip('dHTMLToolTip')">科科的博客</span>
</正文>
<html>