表格變換文字
將下列程式碼複製至<head>程式碼</head>區內。
<SCRIPT LANGUAGE="JavaScript"> <!-- Original: Tarjei Davidsen --> <!-- Download this script and many more at --> <!-- The Java Magician!! --> <!-- Begin var max=0; function textlist() { max=textlist.arguments.length; for (i=0; i<max; i++) this[i]=textlist.arguments[i]; } tl = new textlist( "歡迎進入鄉城風情網站", "1.這是一個會動的文字喔", "2.會直換話", "3.嗯要講啥呢.....", "4.想不到啥話", "5.哈哈龜", "作者網址 :http://gamelineage.24cc.com/ \n歡迎大家參觀指教" ); var x = 0; pos = 0; var l = tl[0].length; function textticker() { document.tickform.tickfield.value = tl[x].substring(0, pos) + "_"; if(pos++ == l) { pos = 0; setTimeout("textticker()", 3000); if(++x == max) x = 0; l = tl[x].length; } else setTimeout("textticker()", 50); } // End --> </script> <center> <form name=tickform> <textarea name=tickfield rows=3 cols=62 style="background-color: #0080c0; color: #ffffff; cursor: default; font-size: 12px" wrap=virtual>請您花少許時間,閱讀以下這段宣告。</textarea> </form> </center> |
將下列程式碼複製至<body 程式碼>的標籤之中。
onload="textticker()"; |