⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 an2.htm

📁 javascript各种效果的实例及源代码
💻 HTM
字号:
<html>

<head>

<title>跑马灯式样的站点栏目指南 </title>

<style type="text/css">

<!--

body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}

A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }

 A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }

a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

-->

</style>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

</head>



<body bgcolor="#fef4d9">

<br>

<br>

<center><font color=red face="隶书" size=5>跑马灯式样的站点栏目指南</font></center>

<br>

<br><center>

<table border=5 bordercolor=blue borderlight=green>

<tr><td align=center><font size=4 color=red face="Arial, Helvetica, sans-serif"><strong>鼠标放上去即可看见效果!</strong></font></td></tr>

<tr><td align=center height=80 width=220><div id="tooltip2" style="position:absolute;visibility:hidden;clip:rect(0 150 50 0);width:150px;background-color:seashell">

<layer name="nstip" width=1000px bgColor="seashell"></layer>

</div>

<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 black">'+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>

        <table border="0">

      <tr>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b> 

          <a href="ye0.htm" onMouseOver="showtip2(this,event,'字符从天而降!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye1.htm" onMouseOver="showtip2(this,event,'状态栏跑马灯1!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye2.htm" onMouseOver="showtip2(this,event,'状态栏跑马灯2!')" onMouseOut="hidetip2()">新的链接</a> 

          </b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye3.htm" onMouseOver="showtip2(this,event,'页面自动滚屏效果!')" onMouseOut="hidetip2()">新的链接</a> 

          </b></font></td>

      </tr>

      <tr>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye4.htm" onMouseOver="showtip2(this,event,'隐藏显示字符脚本!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye5.htm" onMouseOver="showtip2(this,event,'滚动显示的LOGO!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye6.htm" onMouseOver="showtip2(this,event,'鼠标跟踪器!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td>&nbsp;</td>

      </tr>

    </table></td></tr></table></center>

<br>

<br>

<center>

<textarea name=source rows=12 cols=55 class=yk9>

脚本说明:

把如下代码加入<body>区域中(你可以对链接及说明作相应修改)



<div id="tooltip2" style="position:absolute;visibility:hidden;clip:rect(0 150 50 0);width:150px;background-color:seashell">

<layer name="nstip" width=1000px bgColor="seashell"></layer>

</div>

<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 black">'+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>

        <table border="0">

      <tr>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b> 

          <a href="ye0.htm" onMouseOver="showtip2(this,event,'字符从天而降!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye1.htm" onMouseOver="showtip2(this,event,'状态栏跑马灯1!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye2.htm" onMouseOver="showtip2(this,event,'状态栏跑马灯2!')" onMouseOut="hidetip2()">新的链接</a> 

          </b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye3.htm" onMouseOver="showtip2(this,event,'页面自动滚屏效果!')" onMouseOut="hidetip2()">新的链接</a> 

          </b></font></td>

      </tr>

      <tr>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye1.htm" onMouseOver="showtip2(this,event,'隐藏显示字符脚本!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye2.htm" onMouseOver="showtip2(this,event,'滚动显示的LOGO!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="ye3.htm" onMouseOver="showtip2(this,event,'鼠标跟踪器!')" onMouseOut="hidetip2()">新的链接</a></b></font></td>

        <td>&nbsp;</td>

      </tr>

    </table>



</textarea>

<SCRIPT LANGUAGE="JavaScript">



<!-- hide



function goHist(a) 



{



   history.go(a);



}



//-->



</script>



<FORM METHOD="post">

<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">

</form>

</center>

<br>

<br>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -