祝福 发表于 2007-12-14 18:22

闪亮的文字

<script Language="JavaScript">
<!--
if(navigator.appVersion.charAt(0)>=4 && (navigator.appVersion).indexOf("MSIE")!=-1) isIE4 = true;
else isIE4 = false;
function textAnima_color2(id,n) {
el = document.all.item(id,n);
charColor = el.getAttribute("SET_COLOR");
cur = el.getAttribute("CURRENT_CHAR");
if(cur=="") cur = 0;
getHTML= el.getAttribute("SET_TEXT");
if(getHTML == "") {
getHTML = el.innerText;
el.setAttribute("SET_TEXT",getHTML);
}
bef_t = getHTML.substring(0,cur); ;
aft_t = getHTML.substring(eval(cur)+1,getHTML.length);
cur_t = getHTML.substr(cur,1);
cur_t = cur_t.fontcolor(charColor);
el.innerHTML = bef_t + cur_t + aft_t;
cur++;
if(cur > getHTML.length) cur=0;
el.setAttribute("CURRENT_CHAR",cur);
getT = el.getAttribute("SET_TIME");
if(getT=="") getT = 100;
setTimeout("textAnima_color2('"+id+"',"+n+")",eval(getT));
}
if(isIE4) {
window.onload = init;
}

function init() {
id = "ANIMA_TEXT_COLOR2";
len = document.all.item(id).length;
if(!len) len=1;
for(var i=0;i<len;i++) {
textAnima_color2(id,i);
}
}
//-->
</script>
<span style="font-size:18pt;font-family:&quot;新細明體&quot;"
id="ANIMA_TEXT_COLOR2" SET_COLOR="yellow"
SET_TIME="100" CURRENT_CHAR SET_TEXT> 欢迎光临中画网 </span>
</p>

<br><br>&lt;script Language=\&quot;JavaScript\&quot;&gt;
&lt;!--
if(navigator.appVersion.charAt(0)&gt;=4 &amp;&amp; (navigator.appVersion).indexOf(\&quot;MSIE\&quot;)!=-1) isIE4 = true;
else isIE4 = false;
function textAnima_color2(id,n) {
el = document.all.item(id,n);
charColor = el.getAttribute(\&quot;SET_COLOR\&quot;);
cur = el.getAttribute(\&quot;CURRENT_CHAR\&quot;);
if(cur==\&quot;\&quot;) cur = 0;
getHTML= el.getAttribute(\&quot;SET_TEXT\&quot;);
if(getHTML == \&quot;\&quot;) {
getHTML = el.innerText;
el.setAttribute(\&quot;SET_TEXT\&quot;,getHTML);
}
bef_t = getHTML.substring(0,cur); ;
aft_t = getHTML.substring(eval(cur)+1,getHTML.length);
cur_t = getHTML.substr(cur,1);
cur_t = cur_t.fontcolor(charColor);
el.innerHTML = bef_t + cur_t + aft_t;
cur++;
if(cur &gt; getHTML.length) cur=0;
el.setAttribute(\&quot;CURRENT_CHAR\&quot;,cur);
getT = el.getAttribute(\&quot;SET_TIME\&quot;);
if(getT==\&quot;\&quot;) getT = 100;
setTimeout(\&quot;textAnima_color2('\&quot;+id+\&quot;',\&quot;+n+\&quot;)\&quot;,eval(getT));
}
if(isIE4) {
window.onload = init;
}

function init() {
id = \&quot;ANIMA_TEXT_COLOR2\&quot;;
len = document.all.item(id).length;
if(!len) len=1;
for(var i=0;i&lt;len;i++) {
textAnima_color2(id,i);
}
}
//--&gt;
&lt;/script&gt;
&lt;span style=\&quot;font-size:10pt;font-family:&amp;quot;新細明體&amp;quot;\&quot;
id=\&quot;ANIMA_TEXT_COLOR2\&quot; SET_COLOR=\&quot;yellow\&quot;
SET_TIME=\&quot;100\&quot; CURRENT_CHAR SET_TEXT&gt; 欢迎光临中画网 &lt;/span&gt;
&amp;nbsp;&lt;/p&gt;

清音王梓 发表于 2007-12-14 18:43

有用!代码拿走了!呵呵呵!

小白兔 发表于 2007-12-14 19:40

JS代码,以后祝福老师多发点,要用的时候我们就直接来拿

书剑飘香 发表于 2007-12-14 21:11

不错。。收藏了

黎民百兴 发表于 2007-12-15 10:43

<script Language=\"JavaScript\"> <!-- if(navigator.appVersion.charAt(0)>=4 && (navigator.appVersion).indexOf(\"MSIE\")!=-1) isIE4 = true; else isIE4 = false; function textAnima_color2(id,n) { el = document.all.item(id,n); charColor = el.getAttribute(\"SET_COLOR\"); cur = el.getAttribute(\"CURRENT_CHAR\"); if(cur==\"\") cur = 0; getHTML= el.getAttribute(\"SET_TEXT\"); if(getHTML == \"\") { getHTML = el.innerText; el.setAttribute(\"SET_TEXT\",getHTML); } bef_t = getHTML.substring(0,cur); ; aft_t = getHTML.substring(eval(cur)+1,getHTML.length); cur_t = getHTML.substr(cur,1); cur_t = cur_t.fontcolor(charColor); el.innerHTML = bef_t + cur_t + aft_t; cur++; if(cur > getHTML.length) cur=0; el.setAttribute(\"CURRENT_CHAR\",cur); getT = el.getAttribute(\"SET_TIME\"); if(getT==\"\") getT = 100; setTimeout(\"textAnima_color2(\'\"+id+\"\',\"+n+\")\",eval(getT)); } if(isIE4) { window.onload = init; } function init() { id = \"ANIMA_TEXT_COLOR2\"; len = document.all.item(id).length; if(!len) len=1; for(var i=0;i<len;i++) { textAnima_color2(id,i); } } //--> </script> <span style=\"font-size:10pt;font-family:\"新細明體\"\" id=\"ANIMA_TEXT_COLOR2\" SET_COLOR=\"yellow\" SET_TIME=\"100\" CURRENT_CHAR SET_TEXT> 字体好漂亮~ </span></p>

林舞二山 发表于 2007-12-16 11:56

<FONT style=\"FONT-SIZE: 120pt; FILTER: glow(color=red); WIDTH: 100%; COLOR: #660099; FONT-FAMILY: 华文行楷\"><B>谢谢推荐</B></FONT>

清林竹影 发表于 2007-12-16 23:04

我也试试。谢谢!

文子 发表于 2007-12-21 11:39

<SPAN id=ANIMA_TEXT_COLOR2 style=\"FONT-SIZE: 20pt; FONT-FAMILY: \'新細明體\'\" SET_TEXT CURRENT_CHAR SET_TIME=\"100\" SET_COLOR=\"yellow\"><FONT color=magenta size=8>感谢祝福老师!</FONT> </SPAN>
<P></P>

笑寒 发表于 2008-1-5 21:29

<script Language=\"JavaScript\"> <!-- if(navigator.appVersion.charAt(0)>=4 && (navigator.appVersion).indexOf(\"MSIE\")!=-1) isIE4 = true; else isIE4 = false; function textAnima_color2(id,n) { el = document.all.item(id,n); charColor = el.getAttribute(\"SET_COLOR\"); cur = el.getAttribute(\"CURRENT_CHAR\"); if(cur==\"\") cur = 0; getHTML= el.getAttribute(\"SET_TEXT\"); if(getHTML == \"\") { getHTML = el.innerText; el.setAttribute(\"SET_TEXT\",getHTML); } bef_t = getHTML.substring(0,cur); ; aft_t = getHTML.substring(eval(cur)+1,getHTML.length); cur_t = getHTML.substr(cur,1); cur_t = cur_t.fontcolor(charColor); el.innerHTML = bef_t + cur_t + aft_t; cur++; if(cur > getHTML.length) cur=0; el.setAttribute(\"CURRENT_CHAR\",cur); getT = el.getAttribute(\"SET_TIME\"); if(getT==\"\") getT = 100; setTimeout(\"textAnima_color2(\'\"+id+\"\',\"+n+\")\",eval(getT)); } if(isIE4) { window.onload = init; } function init() { id = \"ANIMA_TEXT_COLOR2\"; len = document.all.item(id).length; if(!len) len=1; for(var i=0;i<len;i++) { textAnima_color2(id,i); } } //--> </script> <span style=\"font-size:10pt;font-family:\"新細明體\"\" id=\"ANIMA_TEXT_COLOR2\" SET_COLOR=\"yellow\" SET_TIME=\"100\" CURRENT_CHAR SET_TEXT> 先试再拿走,最后谢谢哈~~~ </span></p>

一抹轻烟 发表于 2008-1-6 16:30

<script Language=\"JavaScript\"> <!-- if(navigator.appVersion.charAt(0)>=4 && (navigator.appVersion).indexOf(\"MSIE\")!=-1) isIE4 = true; else isIE4 = false; function textAnima_color2(id,n) { el = document.all.item(id,n); charColor = el.getAttribute(\"SET_COLOR\"); cur = el.getAttribute(\"CURRENT_CHAR\"); if(cur==\"\") cur = 0; getHTML= el.getAttribute(\"SET_TEXT\"); if(getHTML == \"\") { getHTML = el.innerText; el.setAttribute(\"SET_TEXT\",getHTML); } bef_t = getHTML.substring(0,cur); ; aft_t = getHTML.substring(eval(cur)+1,getHTML.length); cur_t = getHTML.substr(cur,1); cur_t = cur_t.fontcolor(charColor); el.innerHTML = bef_t + cur_t + aft_t; cur++; if(cur > getHTML.length) cur=0; el.setAttribute(\"CURRENT_CHAR\",cur); getT = el.getAttribute(\"SET_TIME\"); if(getT==\"\") getT = 100; setTimeout(\"textAnima_color2(\'\"+id+\"\',\"+n+\")\",eval(getT)); } if(isIE4) { window.onload = init; } function init() { id = \"ANIMA_TEXT_COLOR2\"; len = document.all.item(id).length; if(!len) len=1; for(var i=0;i<len;i++) { textAnima_color2(id,i); } } //--> </script> <span style=\"font-size:10pt;font-family:&quot;新細明體&quot;\" id=\"ANIMA_TEXT_COLOR2\" SET_COLOR=\"yellow\" SET_TIME=\"100\" CURRENT_CHAR SET_TEXT> 试下,不知是不是就这么简单~~嘻嘻 </span></p>
页: [1] 2 3 4 5 6 7
查看完整版本: 闪亮的文字