滚动式超链接的制作


简单的文字链接的滚动效果。

制作方法:
将下面的代码复制到<head>~</head>里:
<script language="JavaScript">
<!--
var a,b,go,word;
function greenlight(word){
a="欢迎访问It365cn.com!";
word.style.color="red";
linkSwitch();
}
function linkSwitch(){
clearTimeout(go);
b=a;
a=a.substring(1,100)+a.charAt(0);
esh.innerText=a;
go=setTimeout("linkSwitch()",100);
}
function stp(word){
clearTimeout(go);
esh.innerText="欢迎访问It365cn.com!";
word.style.color="blue";
}
//-->
</script>

将下面的代码复制到<body>~</body>里相关超链接处:
<a href="http://www.it365cn.com/" onMouseOver="greenlight(this)"; onMouseOut="stp(this)"><span id="esh">欢迎访问It365cn.com!</span></a>

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3