安装: 步骤一 拷贝以下脚本后贴在有关网页的 HEAD 之中。 <SCRIPT> <!-- // used to track position in message var i = 0; // used to cycle thru messages var TextNumber = 0; // 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=150; // added to end of each message to create a pause var WaitSpace=" " // used to position text in ver 2.0 var addPadding=""; // Each element of TextInput represents a single message. TextInput[0] = "李隽青词 姚敏曲"; TextInput[1] = "想得我肠儿寸断"; TextInput[2] = "望得我眼儿欲穿"; TextInput[3] = "好容易望到了你回来"; TextInput[4] = "算算已三年"; TextInput[5] = "想不到才见面"; TextInput[6] = "别离又在明天"; TextInput[7] = "这一回你去了几时来"; TextInput[8] = "难道又三年"; TextInput[9] = "左三年 右三年"; TextInput[10] = "这一生见面有几天"; TextInput[11] = "横三年 坚三年"; TextInput[12] = "还不如不见面"; TextInput[13] = "明明不能留恋"; TextInput[14] = "偏要苦苦缠绵"; TextInput[15] = "为什麽放不下这条心"; TextInput[16] = "情愿受熬煎"; TotalTextInput = 16; // (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=200; addPadding=""; } for (var addPause = 0; addPause <= TotalTextInput; addPause++) {TextInput[addPause]=addPadding+TextInput[addPause]+WaitSpace;} var TimerId var TimerSet=false; // Called by the Start button. function startMessage() { if (!TimerSet) { TimerSet=true; teletype(); } } // Gets and displays character from rollMessage() . // Variable Speed controls length of timeout and thus the speed of typing. function teletype() { 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 () { Wait_yn=false; i++; var CheckSpace = HelpText.substring(i-1, i); CheckSpace = "" + CheckSpace; if (CheckSpace == " ") {i++;} if (i >= HelpText.length+1) { i=0; if (TextNumber < TotalTextInput) {TextNumber++;} else {TextNumber = 0;} initMessage(); } Text = HelpText.substring(0, i); return (Text); } // Called from onLoad in BODY tag & resetDisplay(). function titleDisplay() { document.forms[0].elements[0].value="点击下面三键操控。"; initMessage(); } // Sets Text & HelpText equal to messages for use in rollMessage (). function initMessage() { Text = TextInput[TextNumber] HelpText = Text; } // Called by Stop button. function stopMessage() { TimerSet=false; clearTimeout (TimerId); } // Called by Reset button. function resetDisplay() { TimerSet=false; clearTimeout (TimerId); TextNumber=0; i=0; titleDisplay(); } --> </SCRIPT> <form> <TABLE bgcolor="#025B75" WIDTH=200> <TR><TD COLSPAN="3"><TEXTAREA ROWS=1 COLS=28 wrap=yes></TEXTAREA> </TD></TR> <TR> <TD align="center"><INPUT TYPE="button" VALUE="启动" onClick="startMessage()"> <TD align="center"><INPUT TYPE="button" VALUE="重头" onClick="resetDisplay()"> <TD align="center"><INPUT TYPE="button" VALUE="暂停" onClick="stopMessage()"> </TD></TR></TABLE> </center> 步骤二 拷贝以下代码加在<body>之内。 onLoad="titleDisplay()"
安装:
步骤一 拷贝以下脚本后贴在有关网页的 HEAD 之中。
步骤二 拷贝以下代码加在<body>之内。
onLoad="titleDisplay()"