谁帮我解释解释?
<html>
<head>
<TITLE>特效</TITLE>
</head>
<script language=javaScript>
var thissize=20;
var textfont="隶书";
var textcolor= new Array();
textcolor[0]="000000";
textcolor[1]="000000";
textcolor[2]="000000";
textcolor[3]="111111";
textcolor[4]="222222";
textcolor[5]="333333";
textcolor[6]="444444";
textcolor[7]="555555";
textcolor[8]="666666";
textcolor[9]="777777";
textcolor[10]="888888";
textcolor[11]="999999";
textcolor[12]="aaaaaa";
textcolor[13]="bbbbbb";
textcolor[14]="cccccc";
textcolor[15]="dddddd";
textcolor[16]="eeeeee";
textcolor[17]="ffffff";
textcolor[18]="ffffff";
var message = new Array();
message[0]="http://yuxuemei.yeah.net";
message[1]="这是文字特效";
message[2]="大家好";
message[3]="欢迎参观我的主页";
i_message=0;
var i_strength=0;
var i_message=0;
var timer;
function glowtext() {
if(document.all) {
if (i_strength <=17) {
glowdiv.innerText=message[i_message];
document.all.glowdiv.style.filter="glow(color="+textcolor[i_strength]+", strength=4)";
i_strength++;
timer=setTimeout("glowtext()",100);
}
else {
clearTimeout(timer);
setTimeout("deglowtext()",15);
}
}
}
function deglowtext() {
if(document.all) {
if (i_strength >=0) {
glowdiv.innerText=message[i_message];
document.all.glowdiv.style.filter="glow(color="+textcolor[i_strength]+", strength=4)";
i_strength--;
timer=setTimeout("deglowtext()",100);
}
else {
clearTimeout(timer);
i_message++;
if (i_message>=message.length) {i_message=0}
i_strength=0;
intermezzo();
}
}
}
function intermezzo() {
glowdiv.innerText="" ;
setTimeout("glowtext()",1500) ;
}
</script>
<body bgcolor="#000000" onLoad="glowtext()">
<div id="glowdiv" style="position:absolute;visibility:visible;width:600px;text-align:center;
top:150px;left:50px;font-family:隶书;font-size:30pt;color:000000"></div>
</body>
</html>
<body bgcolor="#000000" onLoad="glowtext()">
onLoad 是什么意思?
glowdiv.innerText=message[i_message]; innerText 是什么意思?
document.all.glowdiv.style.filter="glow(color="+textcolor[i_strength]+", strength=4)"; 这句是作什么的?filter 什么意思?
clearTimeout(timer); 什么意思?
if(document.all) 这句起什么作用,拿掉行不?
问题点数:100、回复次数:5Top
1 楼bushido(大饼)回复于 2003-01-06 09:18:24 得分 0
你转贴到web开发里面Top
2 楼GJA106(中文字符)回复于 2003-01-06 09:45:07 得分 30
onLoad --进入页面时首先调用onLoad指定的方法。
glowdiv.innerText=message[i_message]; innerText--块内容
document.all.glowdiv.style.filter="glow(color="+textcolor[i_strength]+", strength=4)"; filter--"faint的意思"然后去msdn查
clearTimeout(timer); --你不能看一看setTimeout是什么意思吗?
if(document.all) --判断document.all(页面所有控件),一般指定到具体控件进行判断。Top
3 楼shkwh(龙威)回复于 2003-01-06 10:05:51 得分 0
什么呀?看不到Top
4 楼xiaomin0613(.net啊。。.net。。。)回复于 2003-01-06 10:46:41 得分 70
onLoad:页面加载的同时,执行这个函数
innerText:包含在<DIV></DIV>标记中间的文本内容
filter:我没用过,我帮你查查看.
clearTimeout(timer): 把计时器timer清空.
if(document.all):判断页面上是否有控件生成.不能去掉.
Top
5 楼xiaomin0613(.net啊。。.net。。。)回复于 2003-01-06 11:23:47 得分 0
filter:是用来做成滤镜效果的.可以跟不同的函数, 做成各种效果.Top




