日本語
<!-- この効果を実現するには、2 つの手順が必要です。最初の手順は、次のコードを <head> 領域に追加することです--> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function randomise(){ var word= document.myform.wordlist.value; var spacer=""; Words=words.split(document.myform.randomiseby.options[document.myform.randomiseby.selectedIndex].value) document.myform.code.value= ""; var colorcheme=new Array("0","1","2","3","4","5","6","7","8","9"," A", "B","C","D","E","F") for(var time=0;time<=(words.length-1);time++){ if(words[time] ==" "){document.myform.code.value+=" "} if(words[time]!=" "){ spacer=document.myform.randomiseby.options[document.myform.randomiseby.selectedIndex].value; var c1= Math.round(Math.random()*(colourscheme.length-1)); var c2=Math.round(Math.random()*(colourscheme.length-1)); (Math.random()*(colourscheme.length-1)); var c4=Math.round(Math.random()*(colourscheme.length-1)); var c5=Math.round(Math.random() *(colourscheme.length-1)); var c6=Math.round(Math.random()*(colourscheme.length-1)); var size=1+Math.round(Math.random()*6); document.myform .code.value+="<font color="#"+colourscheme[c1]+colourscheme[c2]+colourscheme[c3]+colourscheme[c4]+colourscheme[c5]+colourscheme[c6]+" " size= ""+size+"">"+words[time]+"</font>"+spacer+"" } } look_like.innerHTML=document.myform.code.value; } // 終了 -- > </ script> <!--ステップ 2: 次のコードを <body> 領域に追加します--> <form name="myform" action="javascript:randomise()"> <input name="wordlist" value =" Web サイト構築アカデミーへようこそ" size="50"> <br> <select name="randomiseby"> <option value="">文字を区別する</option> <option value=" ">単語を区別する</option > </ select><br><br> <input type="submit" value="Appear"> <br><br> <span id="looks_like"></span> <br><br> <textarea name=" code" rows="5"cols="50"></textarea> </form> </div>