<div class="htmlarea"> <textarea id="runcode26847"> 本特效共分两步: 1.在中加入 2.把下面代码加入中 onload="JSCTimeOutID = window.setTimeout('doMessage()',500);" 例如:</textarea> <br><input onclick="runEx('runcode26847')" type="button" value="运行代码"><input onclick="doCopy('runcode26847')" type="button" value="复制代码"> <input onclick="doSave(runcode26847)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A 全选 注:</a>如需引入外部Js需刷新才能执行</div>]<script language="JavaScript"> <!-- hide from old browsers var str="" var direction="left" function createArray(n) { for (var i = 0; i < n; i++) {this[i] = 0} return this } var js_mult1=3141 var js_mult2=5821 var js_m1=100000000 var js_m2=10000 var js_iseed=0 var js_iseed1=0 var js_iseed2=0 function random(n) { if (js_iseed == 0) { now = new Date() js_iseed = now.getHours() + now.getMinutes() * 60 + now.getSeconds() * 3600 } js_iseed1 = js_iseed / js_m2 js_iseed2 = js_iseed % js_m2 var tmp = (((js_iseed2 * js_mult1 + js_iseed1 * js_mult2) % js_m2) * js_m2 + (js_iseed2 * js_mult2)) % js_m1 js_iseed = (tmp + 1) % js_m1 return (Math.floor((js_iseed/js_m1) * n)) } msgArray = createArray(5) msgArray[0] = "»¶Ó­¹âÁÙ,ÕâÀïÊÇTyphoon Start" msgArray[1] = "JavaScript FairylandÊÇÄãÀíÏëµÄÈ¥´¦" msg = "" dmsg = "" function doMessage() { if (msg == dmsg) // reset and delay { msg = msgArray[random(5)] dmsg = "" for (var ii = 0; ii < msg.length; ii++) dmsg += " " JSCTimeOutID = window.setTimeout('doMessage()',100) return true } // pick a character var ii = random(msg.length) var astr = dmsg.substring(0, ii) var bstr = msg.substring(ii, ii+1) var cstr = dmsg.substring(ii+1, dmsg.length) dmsg = astr+bstr+cstr window.status = dmsg JSCTimeOutID = window.setTimeout('doMessage()',50) return true } <!-- done hiding --> </script>