中文(繁体)
<!-- 將下列程式碼加入<body>區域--> <script language="JavaScript"> function makeArray(n){ this.length=n return this } function hexfromdec(num) { hex=new makeArray( 1); var 十六進位字串=“”; var shifthex=16; var temp1=num; for(x=1; x>=0; x--) { hex[x]=Math.round(temp1/shifthex - .5);十六進位[x-1]=temp1 - 十六進位[x] * shifthex; temp1=十六進位[x-1];移位十六進位 /= 16; } for (x=1; x>=0; x--) { hexstring+=getletter(hex[x]);返回(十六進製字串); } 函數 getletter(num) { if (num < 10) { return num; } else { if (num == 10) { return "A" } if (num == 11) { return "B" } if (num == 12) { return "C" } if (num == 13) { return "D" } if (num == 14) { return "E" } if (num == 15) { return "F" } } } function Rainbow(text){ var color_d1; var allstring=""; for(i=0;i<text.length;i=i+2){ color_d1=255*Math.sin(i/(text.length/3)); color_h1=hexfromdec(color_d1); allstring+="<FONT COLOR="+color_h1+"ff"+color_h1+">"+text.substring(i,i+2)+"</FONT>";返回所有字串; } 函數 sizefont(text){ var color_d1; var allstring="";變數標誌=0; for(i=0,j=0;i<text.length;i=i+1){ if (flag==0) { j++; if (j>=7) { flag=1;}} if (flag==1) { j=j-1; if (j<=0) { 標誌=0; }} allstring+="<FONT SIZE="+ j + ">" + text.substring(i,i+1) + "</FONT>";返回所有字串; } document.write("<font size=5><CENTER>") document.write("<BR><BR>") document.write( sizefont("建站學院專業網頁教學站點")) document.write( “</CENTER></font>”)</腳本>