*.php 파일로 직접 저장해서 실행하시면 됩니다. $color_back="#000000"; $number_w=8; $number_h=6; $space=1; $f $speed=0; ?> <머리> 매트릭스 <br>// ************************** *************************************** <br>// 작성자: Caocao <br> // caocao@eastday.com <br>// http://caocao.oso.com.cn <br>// ********************** ******************************************* <br>number_h=< ? echo $number_h;?>; <br>step=5 <br>text=new Array("A","B","C ","D","E","F","G","H","I","J","K","L","M","N","O", "P","Q","R","S","T","U","V","W","X","Y","Z") <br>grad= new Array("#000000","#004000","#008000","#00C000","#00FF00") <br>function line() <br>{ <br> this.start=100; 🎜> this.end=60; <br> this.restart=0; <br>} <br>function randchar() <br>{ <br> return (text[Math.round(Math.random()*25 )]); <br>함수 초기() <br>{ <br> matrix=new Array(); <br> light=new Array(); number_h;i ) <br> { <br> for (j=0;j<number_w;j ) <br> { <br> 행렬[i*number_h j]="<? echo $color_back;?>"; <br> } <br> } <br> for (j=0;j<number_w;j ) <br> { <br> light[j]=new line(); <br> } <br>} <br>function new_light() <br>{ <br> for (j=0;j<number_w;j ) <br> { <br> if (light[j].restart== 0) <br> { <br> light[j].start=0; <br> light[j].end=-10-Math.round(Math.random()*20); ].restart=light[j].end-Math.round(Math.random()*20); <br> } <br> else <br> { <br> light[j].start ; [j].end ; <br> light[j].restart ; <br> } <br> } <br>} <br>function new_color(i,j) <br>{ <br> if ((light[ j].start-i)<5&&(light[j].start-i)>0) <br> { <br> return (light[j].start-i) <br> } <br> if ((i-light[j].end)<5&&(i-light[j].end)>0) <br> { <br> return (i-light[j].end) <br> } <br> if ((i-light[j].end)>4&&(light[j].start-i)>4) <br> { <br> return (4) <br> } <br> return (0); <br>} <br>function display() <br>{ <br> for (i=0;i<number_h;i ) <br> { <br> for (j=0 ;j<number_w;j ) <br> { <br> eval("w" i "h" j).innerHTML="<font color=" grad[new_color(i,j)] ">" ) "</font>"; <br> } <br> } <br>} <br>function show() <br>{ <br> new_light(); <br> 디스플레이(); <br> setTimeout("show()",<? echo $speed;?>); <br>} <br> <br><!-- <br><? <br> echo ".size,tr,td { 글꼴 크기: ".$font_size."pt; 줄 높이: ".$font_size."pt ;color:#00FF00}n"; <br>?> <br>--> <br> echo ""; echo "" for ($i=0;$i<$number_h;$i ) { echo "" for ($j=0;$j<$number_w;$j ) { echo "M" echo " "; > } echo ""; <br> show() <br> <br></p>