 |
|
|  |
»óŹٿ¡¼ Type Text & Scroll out È¿°ú |
|
|
 ȨÆäÀÌÁö |
20³â Àü |
<SCRIPT LANGUAGE="JavaScript">
<!--Java Script to type out, then scroll off messages from the status bar
/* Created by Scott Thomason, 8/7/97 from an idea by Ronald Membreno.
Copyright (c) CSSI, All rights reserved.
This code my be reused or modified as needed if these credit lines are not removed.
Messages may be added by following the format below. Insure that you also change
q_msg to equal the last message number.
*/
var txt_msg = new Array();
txt_msg[0] = "Hello, and welcome to our homepage!";
txt_msg[1] = "Make sure to tell all your friends about us!";
txt_msg[2] = "Thanks for stopping by!";
var q_msg = 2;
var msg_num = 0;
var msg_len = 0;
var msg_scr = 0;
var reset_val = 0;
// Feel free to play with the following timing values to give the appearance you want.
t_type = 90;
t_disp = 1500;
t_scr = 30;
t_blank = 750;
// This function types out the message typewriter style. Once the message is completly displayed,
// the function 'removes()' is called.
function displays() {
if (msg_num > q_msg) {
msg_num = reset_val;
}
msg_len++;
window.status = txt_msg[msg_num].substring(reset_val, msg_len);
if (msg_len == txt_msg[msg_num].length) {
// This timer waits for a specified period with the message completely displayed before calling
// the remove function.
timer_disp=window.setTimeout ("removes()", t_disp);
}
else {
// This timer recursively calls this function to display the next letter.
timer_type=window.setTimeout ("displays()", t_type);
}
}
// This function removes the text, one letter at a time from the left, giving the appearance of
// scrolling. Once it scrolls completely off, function 'displays()' is called again.
function removes()
{
msg_scr++;
if (msg_scr > txt_msg[msg_num].length) {
msg_num++;
msg_len = reset_val;
msg_scr = reset_val;
// This timer is executed after the message is completely removed.
timer_blank=window.setTimeout ("displays()", t_blank)
}
else {
window.status = txt_msg[msg_num].substring(msg_scr, txt_msg[msg_num].length);
// This timer calls this function recursively to remove letters. This gives the appearance of scrolling.
timer_scr=window.setTimeout ("removes()", t_scr);
}
}
//-->
</SCRIPT>
</HEAD>
<BODY onload=displays()>
|
|
̵̧ : 511 |
̵̧
¸ñ·Ï
|
|
|  |
|