文字の色を変更する MENU
Source

    <HTML lang="ja"> <HEAD> <TITLE>文字の色を変更する</TITLE> <STYLE TYPE="text/css"> <!-- BODY {background-color: #2E8B57; color: #ffffff; font-size: 12pt; } .fm {font-size: 30pt; font-weight: bold; font-family: fantasy; } //--> </STYLE> <SCRIPT LANGUAGE="JavaScript"> <!-- var sw = 0; var rrggbb = "#0000ff"; var rgb = new Array(0,0,0); function disp() { rgb[0] = Math.round(Math.random()*255); rgb[1] = Math.round(Math.random()*255); rgb[2] = Math.round(Math.random()*255); rrggbb = "rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ")"; if(sw==0){text1.style.color=rrggbb;} if(sw==1){text2.style.color=rrggbb;} if(sw==2){text3.style.color=rrggbb;} if(sw==3){text4.style.color=rrggbb;} if(sw==4){text5.style.color=rrggbb;} if(sw==5){text6.style.color=rrggbb;} if(sw==6){text7.style.color=rrggbb;} sw++; if(sw>6)sw = 0; } //--> </SCRIPT> </head> <BODY onLoad="setInterval('disp()',200)"> <table align="center"> <tr><td ID=text1 class="fm">W</td> <td ID=text2 class="fm">e</td> <td ID=text3 class="fm">l</td> <td ID=text4 class="fm">c</td> <td ID=text5 class="fm">o</td> <td ID=text6 class="fm">m</td> <td ID=text7 class="fm">e</td></tr> </table> </body> </html>