企业可选用的折旧方法:高手们来看下这个代码问题
来源:百度文库 编辑:中科新闻网 时间:2024/05/15 10:00:44
我在网站上看到这样一个关于网页特效的文章《鼠标放到链接文字上后,文字不停滚动》,很感兴趣,想在我的网页上也加上这样的效果,就是不懂怎么弄那些代码,看不懂~高手们帮忙给解释一下,谢谢哈~以下是文章的详细内容:
要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中
<SCRIPT LANGUAGE="JavaScript">
<!--
var a,b,go,word;
function greenlight(word){
a="进来看看";
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="一二三四五六七";
word.style.color="blue";
}
//-->
</SCRIPT>
第二步:把如下代码加入到<body>区域中
<A HREF="http://www.jojoo.net" onmouseover="greenlight(this)";
onmouseout="stp(this)"><span id="esh">
<font face="楷体_GB2312" size="3">本站推荐站点</font></span></A>
要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中
<SCRIPT LANGUAGE="JavaScript">
<!--
var a,b,go,word;
function greenlight(word){
a="进来看看";
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="一二三四五六七";
word.style.color="blue";
}
//-->
</SCRIPT>
第二步:把如下代码加入到<body>区域中
<A HREF="http://www.jojoo.net" onmouseover="greenlight(this)";
onmouseout="stp(this)"><span id="esh">
<font face="楷体_GB2312" size="3">本站推荐站点</font></span></A>
那你就按它指示弄就可以了嘛。。。
在<head><body>下面插入就得了啊