The JavaScript Codes is an excellent JavaScript resource with tons of "cut and paste" JavaScript examples for your Web pages. All for free!
<!-- this script got from http://free-javascript-codes.blogspot.com/--><br /> <!-- this script got from http://free-javascript-codes.blogspot.com/--><br /><br /><br /><!-- Start of Fireworks --><br /><script language="JavaScript"><br /><!-- IE4+, NS4+, NS6 Fireworks script by kurt.grigg@virgin.net<br />CL=new Array('#ff0000','#00ff00','#ffffff','#ff00ff','#ffa500','#ffff00','#00ff00','#ffffff','#ff00ff')<br />CL2=new Array('#ffa500','#00ff00','#FFAAFF','#fff000','#fffffF')<br />Xpos=130;<br />Ypos=130;<br />I='#00ff00';<br />C=0;<br />S=5;<br />H=null;<br />W=null;<br />Y=null;<br />NS4=(document.layers);<br />NS6=(document.getElementById&&!document.all);<br />IE4=(document.all);<br />A=14;<br />E=120;<br />L=null;<br />if (NS4){<br />for (i=0; i < A; i++)<br />document.write('<LAYER NAME="nsstars'+i+'" TOP=0 LEFT=0 BGCOLOR='+I+' CLIP="0,0,2,2"></LAYER>');<br />}<br />if (NS6){<br />window.document.body.style.overflow='hidden';<br />for (i=0; i < A; i++)<br />document.write('<div id="ns6stars'+i+'" style="position:absolute;top:0px;left:0px;height:2px;width:2px;font-size:2px;background:'+I+'"></div>');<br />}<br />if (IE4){<br />document.write('<div id="ie" style="position:absolute;top:0px;left:0px"><div style="position:relative">');<br />for (i=0; i < A; i++)<br />document.write('<div id="iestars" style="position:absolute;top:0;left:0;width:2px;height:2px;background:'+I+';font-size:2px"></div>');<br />document.write('</div></div>');<br />}<br />function Fireworks(){<br />H=(NS4||NS6)?window.innerHeight:window.document.body.clientHeight;<br />W=(NS4||NS6)?window.innerWidth:window.document.body.clientWidth;<br />Y=(NS4||NS6)?window.pageYOffset:window.document.body.scrollTop;<br />for (i=0; i < A; i++){<br />if (IE4)L=iestars[i].style;<br />if (NS4)L=document.layers["nsstars"+i];<br />if (NS6)L=document.getElementById("ns6stars"+i).style;<br />var F = CL[Math.floor(Math.random()*CL.length)];<br />var RS=Math.round(Math.random()*2);<br />L.top = Ypos + E*Math.sin((C+i*5)/3)*Math.sin(C/100)<br />L.left= Xpos + E*Math.cos((C+i*5)/3)*Math.sin(C/100)<br />if (C < 110){<br /> if (NS4){L.bgColor=I;L.clip.width=1;L.clip.height=1}<br /> if (IE4||document.getElementById)<br /> {L.background=I;L.width=1;L.height=1;L.fontSize=1}<br /> }<br />else{<br /> if (NS4){L.bgColor=F;L.clip.width=RS;L.clip.height=RS}<br /> if (IE4||document.getElementById){L.background=F;L.width=RS;L.height=RS;L.fontSize=RS}<br /> }<br />}<br />if (C > 220){<br /> C=0;<br /> var NC = CL2[Math.floor(Math.random()*CL2.length)];<br /> I=NC;<br /> E=Math.round(100+Math.random()*90);<br /> Ypos = E+Math.round(Math.random()*(H-(E*2.2)))+Y;<br /> Xpos = E+Math.round(Math.random()*(W-(E*2.2)));<br />}<br />C+=S;<br />setTimeout("Fireworks()",10);<br />}<br />Fireworks();<br />// --><br /></script><br /><!-- End of Fireworks --><br /><br /><font face="Tahoma"><a target="_blank" href="http://free-javascript-codes.blogspot.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Codes</span></a></font><br />
Main Page What is JavaScript How to implement JS codes? What is HTML? HTML Codes