可以文本显示的公告栏

2016-01-29 14:22 26 1 收藏

可以文本显示的公告栏,可以文本显示的公告栏

【 tulaoshi.com - PHP 】

  一个可以文本显示的公告栏,可以在多处使用,绝对不可错过!

脚本说明:
第一步:把如下代码加入<head区域中
<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="rn";

// Each element of TextInput represents a single message.
TextInput[0] = "今天注意了有新的任务布置";
TextInput[1] = "欢迎你的光临!本站为你提供大量javascript下载";
TextInput[2] = "重点介绍Javascript";
TextInput[3] = "与制作网页特效密切相关的技术";
TextInput[4] = "本站同时有影音空间等栏目";
TextInput[5] = "还有新闻及健康方面的资料";
TextInput[6] = "还有宽带网方面的大量技术文章";
TextInput[7] = "本站网址:http://www.njcatv.net";

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="rn 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


第二步:在<body区域中加入如下代码:
<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="

来源:https://www.tulaoshi.com/n/20160129/1493117.html

延伸阅读
标签: 电脑入门
设置快速启动栏和任务栏分栏显示 任务栏右键,取消锁定任务栏前面的√号。 在快速启动栏出现可以拉动的图形标示,如下图。 图1 鼠标放到可以拉动的图形标示上面,出现可以向两端拉动的箭头,拉动图形标示,出现以下画面。 图2 再次拉动图形标示拉倒左侧即可完成快速启动栏和任务栏分栏显示,如下图。 图3 如果需要恢复显...
标签: 电脑入门
任务栏不显示内容 Windows XP 任务栏不显示内容了,即当应用程序窗口执行最小化后,任务栏不显示图标。 但在Windows任务管理器中能看到,要显示任务,只能按 Alt+Tab键,很麻烦。其实可以这样处理: (1)创建一个新的账号,并用该新账号登录,观察问题是否依旧。如果没有问题的话,说明该问题是由于用户配置文件损坏造成的。 可以用另一个管...
标签: ASP
  显示的形式 id name 1 juliet 2 cristine 3 boy 4 girl 首页 前页 后页 尾页 页数:1/4 4记录/页 总记录数:13条 代码: <!--page.asp-- <!--#include file="conn.asp"-- <html <body bgcolor="#FFFFFF" text="#000000" <table width="60%" border="1" align="cen...
标签: windows 操作系统
使用Windows 98在屏幕的右下角任务栏上有一个时间显示,你想不想改一改它的面貌,如果你想试一下请跟我来。 在注册表键值HKEY_CURRENT_USERControl PanelInternational下找到字符串“Locale”。字符串“Locale”的值有两种: 一种是“00000409”表示12小时制; 另一种是“00000804”表示24小时制。 同时还可看到另外三个字符串:“s1159”表...
在工具栏按钮上添加文本标签 作者:赵新国 一、前 言 对于 工具栏 ,我想大家一定不陌生,它直观,使用方便,它给应用程序的用户带来极大的方便.对VC++程序员来说,为自己开发的软件加上一个工具栏并不难,几乎每本介绍VC++的书都少不了介绍这方面的内容,并且,如果在开发初期就想加入工具...

经验教程

140

收藏

76
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部