鼠标小虫

<head>
<script language="JavaScript">
function YY_Layerfx(yyleft, yytop, yyfnx, yyfny, yydiv, yybilder, yyloop, yyto, yycnt, yystep)
{
if ((document.layers)||(document.all))
{
with (Math)
{
yynextx= eval(yyfnx)
}
with (Math)
{
yynexty= eval(yyfny)
}
yycnt=(yyloop && yycnt>=yystep*yybilder)?0:yycnt+yystep;
if (document.layers)
{
eval(yydiv+".top="+(yynexty+yytop))
eval(yydiv+".left="+(yynextx+yyleft))
}
if (document.all)
{
eval("yydiv=yydiv.replace(/.layers/gi, '.all')");
eval(yydiv+".style.pixelTop="+(yynexty+yytop));
eval(yydiv+".style.pixelLeft="+(yynextx+yyleft));
}
argStr='YY_Layerfx('+yyleft+','+yytop+',"'+yyfnx+'","'+yyfny+'","'+yydiv+'",'+yybilder+','+yyloop+','+yyto+','+yycnt+','+yystep+')';
if (yycnt<=yystep*yybilder)
{
eval(yydiv+".yyto=setTimeout(argStr,yyto)");}
}
}

function YY_Mousetrace(evnt)
{
if (yyns4)
{
if (evnt.pageX)
{
yy_ml=evnt.pageX; yy_mt=evnt.pageY;
}
}
else
{
yy_ml=(event.clientX + document.body.scrollLeft);
yy_mt=(event.clientY + document.body.scrollTop);
}
if (yy_tracescript)eval(yy_tracescript)
}
</script>

</head>
<body bgcolor="e6e8fa">
<!-- 输入主页内容 -->
<!-- 跟随点数及初始位置 -->
<div id="yyd0" style="position:absolute; left:10px; top:50px; width:3px; height:3px; z-index:1; background-color: #000000; layer-background-color: #19636c; border: 5px none #000000; clip: rect(0 3 3 0)"></div>
<div id="yyd1" style="position:absolute; left:20px; top:52px; width:3px; height:3px; z-index:1; background-color: #ff0000; layer-background-color: #708574; border: 1px none #ff0000; clip: rect(0 3 3 0)"></div>
<div id="yyd2" style="position:absolute; left:30px; top:54px; width:3px; height:3px; z-index:1; background-color: #00ff00; layer-background-color: #379bbf; border: 1px none #00ff00; clip: rect(0 3 3 0)"></div>
<div id="yyd3" style="position:absolute; left:40px; top:56px; width:3px; height:3px; z-index:1; background-color: #0000ff; layer-background-color: #25184c; border: 1px none #0000ff; clip: rect(0 3 3 0)"></div>
<div id="yyd4" style="position:absolute; left:50px; top:58px; width:3px; height:3px; z-index:1; background-color: #ffff00; layer-background-color: #31bd3c; border: 1px none #ffff00; clip: rect(0 3 3 0)"></div>
<div id="yyd5" style="position:absolute; left:60px; top:60px; width:3px; height:3px; z-index:1; background-color: #00ffff; layer-background-color: #c11efd; border: 1px none #00ffff; clip: rect(0 3 3 0)"></div>
<!-- 跟随点的轨迹 -->
<script>
var yyns4=window.Event?true:false;
var yy_mt = 0;
var yy_ml = 0;
document.onmousemove = YY_Mousetrace;
yy_tracescript = '';
if (yyns4)
{
document.captureEvents(Event.MOUSEMOVE);
YY_Mousetrace('',',document.YY_Mousetrace1')
}
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/39.83007847812662))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/34.224861639800686))+0)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd0\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/27.66510707209673))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/9.240632767417667))+30)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd1\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/16.45318944579641))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/16.0564452288292))+60)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd2\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/6.95348954836835))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/44.13697049887155))+90)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd3\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/33.90077294583733))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/2.2378828869411587))+120)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd4\']',2000,true,80,0,1);
YY_Layerfx(0,0,'yy_ml+cos((15*sin(yycnt/37.858312521039835))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','yy_mt+sin((15*sin(yycnt/18.083839795990098))+150)*150*(sin(10+yycnt/20)+0.2)*cos(yycnt/20)','document.layers[\'yyd5\']',2000,true,80,0,1);
</script>
请看效果:





返回