※ 訊息公告 ※
|
<body bgcolor="#FFFFFF" <table border="0" background="jpg/01_bkg1.jpg"> <p align="center"><font color="#000000" size="3"><script> <!-- Activate Cloaking Device // used to track position in message var i = 0; // used to cycle thru messages var TextNumber = -1; // array of messages var TextInput = new Object(); // used to load manipulate message var HelpText=""; // used to load message var Text = ""; // length of timeout (smaller is faster) var Speed=50; // used to display message number var message=0; // used to position text in ver 2.0 var addPadding="\r\n"; // Each element of TextInput represents a single message. TextInput[0] = "【Java Applet】本單元是為各位網友收集一些網頁上相當有用的 Java Applet 程式,免費提供給你,讓你的 Homepage 活起來。"; TextInput[1] = "【Java Script】本單元為你收集一些 Homepage 上常用的 Java Script程式,只要你有初步的概念,就能夠運用自如,為你自己的 Homepage 增添些驚奇。"; TextInput[2] = "【免費資源】本單元收集了不少,你在網頁製作使時所必須用到的東東,將陸續為你收集網路上提供免費服務的站台。"; TextInput[3] = "【網站精選】提供您內容豐富的網站。"; TotalTextInput = 4; // (0, 1, 2, 3, 4, 5, 6, 7) // Positioning and speed vary between versions. var Version = navigator.appVersion; if (Version.substring(0, 1)==3) { Speed=100; addPadding=""; } for (var addPause = 0; addPause <= TotalTextInput; addPause++) {TextInput[addPause]=addPadding+TextInput[addPause];} var TimerId var TimerSet=false; // Called by >>> button (display next message) . function nextMessage() { if (!TimerSet) { TimerSet=true; clearTimeout (TimerId); if (TextNumber>=TotalTextInput) { alert("This is the end of the list!"); TimerSet=false; } else { TextNumber+=1; message=TextNumber+1; document.forms[0].elements[2].value= message; Text = TextInput[TextNumber]; HelpText = Text; } teletype(); } } // Gets and displays character from rollMessage() . // Variable Speed controls length of timeout and thus the speed of typing. function teletype() { if (TimerSet) { Text=rollMessage(); TimerId = setTimeout("teletype()", Speed); document.forms[0].elements[0].value=Text; } } // Pulls one character at a time from string and returns (as Text) to function teletype() for displaying. function rollMessage () { i++; var CheckSpace = HelpText.substring(i-1, i); CheckSpace = "" + CheckSpace; if (CheckSpace == " ") {i++;} if (i >= HelpText.length+1) { TimerSet=false; Text = HelpText.substring(0, i); i=0; return (Text); } Text = HelpText.substring(0, i); return (Text); } // Initially called by onLoad in BODY tag to load title. function initTeleType() { Text="\r\n ?D?o?U-±?o?s¥i?Y??§i°TR§"; document.forms[0].elements[0].value=Text; } // Called by <<< button (get previous message). function lastMessage() { if (!TimerSet && TextNumber!=-1) { TimerSet=true; clearTimeout (TimerId); if (TextNumber<=0) { alert("This is the beginning of the list!"); TimerSet=false; } else { TextNumber-=1; message=TextNumber+1; document.forms[0].elements[2].value= message; Text = TextInput[TextNumber]; HelpText = Text; } teletype(); } } // Deactivate Cloaking --> </script></font></p> <hr width="90%"> <h3 align="center"><font color="#000000" size="5">──本站訊息公告欄── </font></h3> <form> <p align="center"><font size="6"><textarea name="teletype" rows="3" cols="40" wrap="yes"></textarea> </font></p> <div align="center"><center><table border="0" width="250"> <tr> <td align="center" valign="top"><font size="6"><input type="button" value="回顧訊息" onclick="lastMessage()"></font></td> <td align="center"><font size="6"><input type="text" size="3"> </font></td> <td align="center" valign="top"><font size="6"><input type="button" value="瀏覽訊息" onclick="nextMessage()"></font></td> </tr> </table> </center></div> </form> <hr width="90%"> |