#1 彩虹字 - 蛙 (Administrator) 發表於 31-5-2013 11:54
<P><FONT color=purple><SCRIPT LANGUAGE="JavaScript"><BR><!-- Begin<BR>function createHexArray(n) {<BR>this.length = n;<BR>for (var i = 1; i <= n; i++)<BR>this = i - 1;</FONT></P><P><FONT color=purple>this[11] = "A";<BR>this[12] = "B";<BR>this[13] = "C";<BR>this[14] = "D";<BR>this[15] = "E";<BR>this[16] = "F";<BR>return this;<BR>}<BR>hx = new createHexArray(16);</FONT></P>
<P><FONT color=purple>function convertToHex(x) {<BR>if (x < 17) x = 16;<BR>var high = x / 16;<BR>var s = high+"";<BR>s = s.substring(0, 2);<BR>high = parseInt(s, 10);<BR>var left = hx[high + 1];<BR>var low = x - high * 16;<BR>if (low < 1) low = 1;<BR>s = low + "";<BR>s = s.substring(0, 2);<BR>low = parseInt(s, 10);<BR>var right = hx[low + 1];<BR>var string = left + "" + right;<BR>return string;<BR>}</FONT></P>
<P><FONT color=purple>function makeRainbow(text) {<BR>text = text.substring(0, text.length);<BR>color_d1 = 255;<BR>mul = color_d1 / text.length;<BR>for(var i = 0; i < text.length; i++) {<BR>color_d1 = 255*Math.sin(i / (text.length / 3));<BR>color_h1 = convertToHex(color_d1);<BR>color_d2 = mul * i;<BR>color_h2 = convertToHex(color_d2);</FONT></P>
<P><FONT color=purple>k = text.length;<BR>j = k - i;<BR>if (j < 0) j = 0;<BR>color_d3 = mul * j;<BR>color_h3 = convertToHex(color_d3);</FONT></P>
<P><FONT color=purple>document.write("<FONT COLOR=\"#" + color_h3 + color_h1 + color_h2 + "\">" + text.substring(i, i + 1) + "</FONT>"<BR> }<BR>}<BR>// End --><BR></script></FONT></P>
<P><FONT color=purple></FONT> </P><FONT color=blue>
<P><BR><FONT color=purple><right><BR><font size=7 face="impact"><BR><script><BR><!--<BR>makeRainbow("笨笨網站bunbun000.com"<BR>// --><BR></script><BR></font><BR><right></FONT></P>
<P></FONT><FONT color=blue></FONT> </P>
<P><FONT color=blue></FONT> </P>
<P><FONT color=blue>笨笨網站bunbun000.com <<<< 可隨意更改</FONT></P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff size=3>如不能顯示語法效果可貼去本站</FONT><A href="http://www.bunbun000.com/html/index.htm" target=_blank><FONT color=red size=3>語法測試板</FONT></A><FONT color=#0000ff size=3>試看</FONT></P>