48、可以控制的公告栏

48、可以控制的公告栏

</form>

<p align="center">

       <TEXTAREA onmouseover=this.focus() style="BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 1px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; BORDER-LEFT: #000000 1px solid; PADDING-TOP: 1px; BORDER-BOTTOM: #000000 1px solid" onfocus=this.select() name=S1 rows=7 cols=66><html>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>网页特效--可以控制的公告栏</title>

</head>

 

<body>

 

<script language="JavaScript">

<!-- Activate Cloaking Device

 

 

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] = "欢迎光临网页特效";

TextInput[1] = "网站开发与维护";

TextInput[2] = "服务器的托管与租用";

TextInput[3] = "域名申请企业邮局";

TextInput[4] = "软件开发程序定制";

TextInput[5] = "网站管理系统";

TextInput[6] = "提出宝贵意见";

TextInput[7] = "再次感谢你的光临";

 

TotalTextInput = 7; // (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];}

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 Manual Tele-Type Display";

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>

 

 

<form>

<table CELLSPACING="0" CELLPADDING="0" WIDTH="17%">

<tr>

<td width="100%" colspan="3" valign="top"><div align="center"><p><textarea NAME="teletype" ROWS="3" COLS="28" wrap="yes">

 

Write a comment

Comments: 0