<div class="htmlarea"> <textarea id="runcode1197"> <script language="javascript"> <!-- function initArray() { this.length = initArray.arguments.length; for (var i = 0; i < this.length; i++) { this[i] = initArray.arguments[i]; } } var ctext = "看我的颜色"; var speed = 1000; var x = 0; var color = new initArray( "red", "blue", "green", "black", "#cc6600", "#CA0BBF", "#666666", "#9310F9"); if (navigator.appVersion.indexOf("MSIE") != -1) { document.write('<div id="c">'+ctext); } function chcolor() { if (navigator.appVersion.indexOf("MSIE") != -1) { document.all.c.style.color = color[x]; } (x < color.length-1) ? x++ : x = 0; } setInterval("chcolor()",1000); --> </script> </textarea><br><input onclick="runEx('runcode1197')" type="button" value="运行代码"> <input onclick="doCopy('runcode1197')" type="button" value="复制代码"> <input onclick="doSave(runcode1197)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>