日期:2014-05-18 浏览次数:20414 次
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>未命名頁面</title> <script type="text/javascript"> var col = new Array(); col[15] = '#000000'; col[14] = '#111111'; col[13] = '#222222'; col[12] = '#333333'; col[11] = '#444444'; col[10] = '#555555'; col[9] = '#666666'; col[8] = '#777777'; col[7] = '#888888'; col[6] = '#999999'; col[5] = '#AAAAAA'; col[4] = '#BBBBBB'; col[3] = '#CCCCCC'; col[2] = '#DDDDDD'; col[1] = '#EEEEEE'; col[0] = '#FFFFFF'; var i = col.length; var isOut = true; function pageLoad() { over(); } function over() { if (i>=0 && isOut) { i--; document.getElementById("Text1").style.color=col[i]; //alert(i); } else if(i <= 14 && !isOut) { i++; document.getElementById("Text1").style.color=col[i]; } else { isOut = !isOut; } setTimeout('over()',100); } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> </div> <input id="Text1" type="text" value="中文" /> </form> </body> </html>
------解决方案----