#1 大迴環滑鼠游標 - 蛙 (Administrator) 發表於 11-6-2012 07:16
<P><FONT color=purple><FONT size=3>如不能顯示語法效果可貼去本站</FONT><A href="http://www.bunbun000.com/html/index.htm" target=_blank><FONT color=red size=3>語法測試板</FONT></A><FONT color=#0000ff size=3>試看</FONT></FONT></P><P><FONT color=#0000ff size=3></FONT> </P>
<P><FONT color=#0000ff size=3></FONT> </P>
<P><FONT color=purple></FONT> </P>
<P><FONT color=purple>http://bunbun000.com/home/index/bunlogo2.gif </FONT></P>
<P><FONT color=purple>圖檔網址,可更改</FONT></P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue><script language="JavaScript"><BR><!-- <BR>var images='http://bunbun000.com/home/index/bunlogo2.gif ';<BR>amount=2;<BR>var yBase = 150;<BR>var xBase = 200;<BR>var step = .2;<BR>var currStep = 0;<BR>var Xpos = 5;<BR>var Ypos = 5;<BR>var i = 0;<BR>var j = 0;<BR>if (document.all)<BR>{<BR>document.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px">')<BR>document.write('<div id="c" style="position:relative">');<BR>for (n=0; n < amount; n++)<BR>document.write('<img src=" '+images+'" style="position:absolute;top:0px;left:0px">')<BR>document.write('</div>')<BR>document.write('</div>')</FONT></P>
<P><FONT color=blue>function MsieMouseFollow(){<BR>Xpos = document.body.scrollLeft+event.x-5;<BR>Ypos = document.body.scrollTop+event.y-5;<BR>}<BR>document.onmousemove = MsieMouseFollow;<BR>}<BR>else if (document.layers)<BR>{<BR>window.captureEvents(Event.MOUSEMOVE);<BR>for (ns=0; ns < amount; ns++) <BR>document.write("<LAYER NAME='n"+ns+"' LEFT=0 TOP=0><IMG SRC='"+images+"'></LAYER>"<BR>function NsMouseFollow(evnt){<BR>Xpos = evnt.pageX-5;<BR>Ypos = evnt.pageY-5;<BR>}<BR>window.onMouseMove = NsMouseFollow;<BR>}<BR>function Swirl(){<BR>if (document.all)<BR>{<BR>yBase = window.document.body.offsetHeight/4;<BR>xBase = window.document.body.offsetWidth/4;<BR>}<BR>else if (document.layers)<BR>{<BR>yBase = window.innerHeight/4;<BR>xBase = window.innerWidth/4;<BR>}</FONT></P>
<P><FONT color=blue>if (document.all)<BR>{<BR>for (i=0;i<ieDiv.all.c.all.length;i++)<BR>{<BR>ieDiv.all.c.all.style.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);<BR>ieDiv.all.c.all.style.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);<BR>}<BR>}<BR>else if (document.layers)<BR>{<BR>for ( j = 0 ; j < ns ; j++ ) //7 is number of NS layers!<BR>{<BR>var temp="n"+j<BR>document.layers[temp].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);<BR>document.layers[temp].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);<BR>}<BR>}<BR>currStep += step;<BR>setTimeout("Swirl()", 10);<BR>}<BR>Swirl();<BR>// --><BR></script></FONT><BR></P>
<script language="JavaScript">
<!--
var images='http://bunbun000.com/home/index/bunlogo2.gif ';
amount=2;
var yBase = 150;
var xBase = 200;
var step = .2;
var currStep = 0;
var Xpos = 5;
var Ypos = 5;
var i = 0;
var j = 0;
if (document.all)
{
document.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px">')
document.write('<div id="c" style="position:relative">');
for (n=0; n < amount; n++)
document.write('<img src=" '+images+'" style="position:absolute;top:0px;left:0px">')
document.write('</div>')
document.write('</div>')
function MsieMouseFollow(){
Xpos = document.body.scrollLeft+event.x-5;
Ypos = document.body.scrollTop+event.y-5;
}
document.onmousemove = MsieMouseFollow;
}
else if (document.layers)
{
window.captureEvents(Event.MOUSEMOVE);
for (ns=0; ns < amount; ns++)
document.write("<LAYER NAME='n"+ns+"' LEFT=0 TOP=0><IMG SRC='"+images+"'></LAYER>"
function NsMouseFollow(evnt){
Xpos = evnt.pageX-5;
Ypos = evnt.pageY-5;
}
window.onMouseMove = NsMouseFollow;
}
function Swirl(){
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4;
xBase = window.innerWidth/4;
}
if (document.all)
{
for (i=0;i<ieDiv.all.c.all.length;i++)
{
ieDiv.all.c.all.style.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
ieDiv.all.c.all.style.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
}
}
else if (document.layers)
{
for ( j = 0 ; j < ns ; j++ ) //7 is number of NS layers!
{
var temp="n"+j
document.layers[temp].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
document.layers[temp].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
}
currStep += step;
setTimeout("Swirl()", 10);
}
Swirl();
// -->
</script>