<html><body bgcolor=black>
<script language="Javascript">
<!--
ns=(document.layers)?1:0;
clrs=new Array
('ff0000','00ff00','ffffff','ff00ff','ffa500','ffff00','00ff00','ffffff','ff00ff
');
var amount=10;
var step=0.5;
var currstep=0;
var ypos=0;
var xpos=0;
if(ns){
for(i=0;i<amount;i++){
document.write('<layer name="n'+i+'" left=0 top=0 bgcolor=#ffffff
clip="0,0,2,2"></layer>');
}
window.captureEvents(Event.MOUSEMOVE);
function nMouse(evnt){
ypos=evnt.pageY;
xpos=evnt.pageX;
}
window.onMouseMove=nMouse;
}
else{
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for(i=0;i<amount;i++){
document.write('<div id="me"
style="position:absolute;top:0px;left:0px;width:2px;height:2px;fontsize:2px;back
ground:#00aaff"></div>');
}
document.write('</div></div>');
function iMouse(){
ypos=event.y+document.body.scrollTop;
xpos=event.x+document.body.scrollLeft;
}
document.onmousemove=iMouse;
}
function comet(){
for(i=0;i<amount;i++){
var randcol=Math.floor(Math.random()*clrs.length);
var layer=(document.layers)?document.layers['n'+i]:me[i].style;
layer.top=ypos+20*Math.sin((currstep+i*3.1)/4)*Math.cos(currstep/10);
layer.left=xpos+20*Math.cos((currstep+i*3.1)/4);
if(ns) layer.bgcolor=clrs[randcol];
else layer.background=clrs[randcol];
}
currstep+=step;
setTimeout("comet()",10);
}
window.onload=comet;
//-->
</script>
<font color=ffffff>这个鼠标效果非常好</font>
</body></html>