要完成此效果把如下代码加入到<body>区域中
<SCRIPT>
if (document.all && window.spotlight){
var x=new Array()
var direction=new Array()
var y=new Array()
if (spotlight.length==null){
spotlight[0]=document.all.spotlight
x[0]=0
direction[0]="right"
y[0]=spotlight[0].height
spotlight[0].filters.light.addPoint(100,50,100,255,255,255,90)
}
else
for (i=0;i<spotlight.length;i++){
x[i]=0
direction[i]="right"
y[i]=spotlight[i].height
spotlight[i].filters.light.addPoint(100,50,100,255,255,255,90)
}
}
function slidelight(cur){
spotlight[cur].filters.light.MoveLight(0,x[cur],y[cur],200,-1)
if (x[cur]<spotlight[cur].width+200 && direction[cur]=="right")
x[cur]+=10
else if (x[cur]>spotlight[cur].width+200){
direction[cur]="left"
x[cur]-=10
}
else if (x[cur]>-200 && x[cur]<-185){
direction[cur]="right"
x[cur]+=10
}
else{
x[cur]-=10
direction[cur]="left"
}
}
if (document.all && window.spotlight){
if (spotlight.length==null)
setInterval("slidelight(0)",spotlight[0].speed)
else
for (t=0;t<spotlight.length;t++){
var temp='setInterval("slidelight('+t+')",'+spotlight[t].speed+')'
eval(temp)
}
}
</SCRIPT>
<P>这个脚本可以使你方便得获得各网站的连接速度,用来做镜像站导航效果不错
<SCRIPT>
tim=1
setInterval("tim++",100)
b=1
var autourl=new Array()
autourl[1]="www.alixixi.com"
autourl[2]="www.sina.com.cn"
autourl[3]="www.163.com"
autourl[4]="www.sohu.com.cn"
autourl[5]="www.c0.com.cn"
function butt(){
document.write("<form name=autof>")
for(var i=1;i<autourl.length;i++)document.write("<input type=text name=txt"+i+" size=10 value=测试中……> <font color=33ff33>》</font><input type=text name=url"+i+" size=45> <font color=33ff33>》</font><input type=button value=进入 onclick=window.open(this.form.url"+i+".value)><br>")
document.write("</form>")
}
butt()
function auto(url){
document.forms[0]["url"+b].value=url
if(tim>200)
{document.forms[0]["txt"+b].value="链接超时"}
else
{document.forms[0]["txt"+b].value="时间"+tim/10+"秒"}
b++
}
function run(){for(var i=1;i<autourl.length;i++)document.write("<img src=http://"+autourl[i]+"/"+Math.random()+" width=1 height=1 onerror=auto('http://"+autourl[i]+"')>")}
run()
</SCRIPT>