码迷,mamicode.com
首页 > 其他好文 > 详细

鼠标触及连接滚动提示信息

时间:2014-10-29 12:51:04      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   os   ar   java   sp   

<html>
<head>
<title>鼠标触及连接滚动提示信息-石家庄瑜伽馆</title>
</head><body>
<!--将以下代码加入HTML的<Body></Body>之间-->
<style type="text/css">
<!--
a:link {  color: #0020FF; text-decoration: none;font-size: 9pt}
a:visited { color:#0020FF; text-decoration: none;font-size: 9pt}
a:hover {  color: #585858; text-decoration: underline;font-size: 9pt}
-->
</style>
<SCRIPT language=JavaScript>
if (!document.layers&&!document.all)
event="test"
function showtip2(current,e,text){

if (document.all&&document.readyState=="complete"){
document.all.tooltip2.innerHTML=<marquee style="border:1px solid blue">+text+</marquee>
document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10
document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10
document.all.tooltip2.style.visibility="visible"
}

else if (document.layers){
document.tooltip2.document.nstip.document.write(<b>+text+</b>)
document.tooltip2.document.nstip.document.close()
document.tooltip2.document.nstip.left=0
currentscroll=setInterval("scrolltip()",100)
document.tooltip2.left=e.pageX+10
document.tooltip2.top=e.pageY+10
document.tooltip2.visibility="show"
}
}
function hidetip2(){
if (document.all)
document.all.tooltip2.style.visibility="hidden"
else if (document.layers){
clearInterval(currentscroll)
document.tooltip2.visibility="hidden"
}
}

function scrolltip(){
if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width)
document.tooltip2.document.nstip.left-=5
else
document.tooltip2.document.nstip.left=150
}
</SCRIPT>
<DIV id=tooltip2 
style="background-color: white; clip: rect(0px 150px 50px 0px); height: 1px; left: 2px; position: absolute; top: 0px; visibility: visible; width: 100px; z-index: 2"><LAYER 
name="nstip" width="500px" bgColor="white"></LAYER></DIV>


<A href="#" onmouseout=hidetip2() onmouseover="showtip2(this,event,‘这是个不错的网站‘)" target=_blank>网页梦工厂</font></A><br>
<A href="#" onmouseout=hidetip2() onmouseover="showtip2(this,event,‘很好的下载站点,速度快‘)" target=_blank>天空下载</font></A><br>
<A href="#" onmouseout=hidetip2() onmouseover="showtip2(this,event,‘编程爱好者的乐园‘)" target=_blank>大富翁论坛</font></A><br>
<A href="#" onmouseout=hidetip2() onmouseover="showtip2(this,event,‘这里有Delphi的好东东‘)" target=_blank>Codelphi</font></A><br>
<A href="#" onmouseout=hidetip2() onmouseover="showtip2(this,event,‘程序员必看‘)" target=_blank>中国软件</font></A><br>
</body></html>

 

鼠标触及连接滚动提示信息

标签:style   blog   http   io   color   os   ar   java   sp   

原文地址:http://www.cnblogs.com/youtianxia/p/4059129.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!