中文(简体)
<!-- http://www.downcodes.com --> <!-- bbs http://www.downcodes.com/bbs--> <!-- 脚本说明: 把以下代码加入<body>区域中--> <图层名称=“a0”左= 10顶部= 10可见性=显示bgcolor =“#ffffff”剪辑=“0,0,1,1”> </图层> <图层名称=“a1”左=10 顶部=10 可见性=显示 bgcolor="#fff000" 剪辑="0,0,1,1"></图层> <图层名称="a2" 左=10 顶部=10 可见性=显示 bgcolor="# ffa000"clip="0,0,1,1"></layer> <layer name="a3"left=10 top=10visibility=show bgcolor="#ff00ff"clip="0,0,1,1 "></图层> <图层名称=“a4”左= 10顶部= 10可见性=显示bgcolor =“#00ff00”剪辑=“0,0,1,1”> </图层> <图层名称=“a5” " 左=10 顶部=10 可见性=显示 bgcolor="#ff00ff" 剪辑="0,0,1,1"></层> <图层名称="a6" 左=10 顶部=10 可见性=显示 bgcolor= "#ff0000"clip="0,0,1,1"></layer> <layer name="a7" left=10 top=10visibility=show bgcolor="#ffffff"clip="0,0,1 ,1"></图层> <图层名称=“a8”左= 10顶部= 10可见性=显示bgcolor =“#fff000”剪辑=“0,0,1,1”> </图层> <图层名称= “a9”左= 10顶部= 10可见性=显示bgcolor =“#ffa000”剪辑=“0,0,1,1”> </层> <图层名称=“a10”左= 10顶部= 10可见性=显示bgcolor="#ff00ff"clip="0,0,1,1"></layer> <layer name="a11" left=10 top=10visibility=show bgcolor="#00ff00"clip="0,0 ,2,2"></layer> <layer name="a12" left=10 top=10visibility=show bgcolor="#0000ff" Clip="0,0,2,2"></layer> <layer name="a13" left=10 top=10visibility=show bgcolor="#ff0000" Clip="0,0,2,2"></layer> <div id="starsDiv" style="position:absolute;顶部:0px;左:0px"> <div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px"></div> <div style="position:relative ;宽度:1px;高度:1px;背景:#fff000;字体大小:1px"></div> <div style="position:relative;宽度:1px;高度:1px;背景:#ffa000;字体大小:1px"></div> <div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px"></div> <div style="position:relative;宽度:1px;高度:1px;背景:#00ff00;字体大小:1px"></div> <div style="position:relative;宽度:1px;高度:1px;背景:#0000ff;字体大小: 1px"></div> <div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px"></div> <div style="position:relative;width :1px;高度:1px;背景:#ffffff;字体大小:1px"></div> <div style="position:relative;width:1px;高度:1px;背景:#fff000;font-size:1px "></div> <div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px"></div> <div style="position:relative;width: 1px;高度:1px;背景:#ff00ff;字体大小:1px"></div> <div style="position:relative;宽度:2px;高度:2px;背景:#ff00ff;font-size:2px" ></div> <div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px"></div> <div style="position:relative;width:1px ;height:1px;background:#FF0000;font-size:1px"></div> </div> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var Clrs = new Array(9); clrs[0] = 'ff0000'; Clrs[1] = '00ff00'; Clrs[2] = '000aff'; Clrs[3] = 'ff00ff'; Clrs[4] = 'ffa500'; clrs[5] = 'ffff00'; Clrs[6] = '00ff00'; Clrs[7] = 'ffffff'; Clrs[8] = 'fffff0'; var sClrs = 新数组(5); sClrs[0] = 'ffa500'; sClrs[1] = '55ff66'; sClrs[2] = 'AC9DFC'; sClrs[3] = 'fff000'; sClrs[4] = 'fffff0'; var yBase; var xBase;变量步骤; var currStep = 0; var Xpos = 1; var Ypos = 1; var 初始星星颜色 = 'ffa000'; var Mtop = 250; var Mleft = 250;函数 Fireworks() { if (document.all) { yBase = window.document.body.offsetHeight / 3; xBase = window.document.body.offsetWidth / 8; } else if (document.layers) { yBase = window.innerHeight / 3; xBase = window.innerWidth / 8; } if (document.all) { 步骤 = 5; for ( i = 0 ; i < starDiv.all.length ; i++ ) { for (ai = 0; ai < Clrs.length; ai++) { var c = Math.round(Math.random()*[ai]); } if (currStep < 90)starsDiv.all[i].style.background=initialStarColor; if (currStep > 90)starsDiv.all[i].style.background=Clrs[c]; starDiv.all[i].style.top = Mtop + yBase*Math.sin((currStep+i*5)/3)*Math.sin(550+currStep/100)starsDiv.all[i].style.left = Mleft + yBase*Math.cos((currStep+i*5)/3)*Math.sin(550+currStep/100) } } else if (document.layers) { step = 5; for ( j = 0 ; j < 24 ; j++ ) { //NS 层数! var templayer = "a"+j; for (ai = 0; ai < Clrs.length; ai++) { var c = Math.round(Math.random()*[ai]); if (currStep < 90) document.layers[templayer].bgColor=initialStarColor; if (currStep > 90) document.layers[templayer].bgColor=Clrs[c]; document.layers[templayer].top = Mtop + yBase*Math.sin((currStep+j*5)/3)*Math.sin(550+currStep/100) document.layers[templayer].left = Mleft + yBase *Math.cos((currStep+j*5)/3)*Math.sin(550+currStep/100) } } currStep+= 步骤; T=setTimeout("Fireworks()",5); if (currStep == 220) { currStep = -10; for (n = 0; n < sClrs.length; n++) { var k = Math.round(Math.random()*n); } 初始星星颜色 = sClrs[k]; if (document.all) { Dtop = window.document.body.clientHeight - 250;左边 = xBase * 3.5; Mtop = Math.round(Math.random()*Dtop); Mleft = Math.round(Math.random()*Dleft); document.all.starsDiv.style.top = Mtop+document.body.scrollTop; document.all.starsDiv.style.left = Mleft+document.body.scrollLeft; } else if (document.layers) { Dleft = window.innerWidth - 100; Dtop = window.innerHeight - 100; Mtop = Math.round(Math.random()*Dtop+window.pageYOffset); Mleft = Math.round(Math.random()*Dleft+window.pageXOffset); document.layers[templayer].top = Mtop; document.layers[templayer].left = Mleft; } if ((Mtop < 20) || (Mleft < 20)) { Mtop += 90;左+= 90; } } } 烟花(); // 结束 --> </脚本>