无为清净楼资源网 Design By www.qnjia.com
一个可以文本显示的公告栏,可以在多处使用,绝对不可错过!
脚本说明:
第一步:把如下代码加入<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="28" wrap="yes"></textarea> </td>
</tr>
<tr align="center">
<td width="40%" valign="top" bgcolor="#0000A0"><input TYPE="button" VALUE="公告栏" onClick="lastMessage()"></td>
<td width="30%" bgcolor="#0000A0" valign="top"><input TYPE="text" value="共8条" SIZE="5" name="1"></td>
<td width="30%" bgcolor="#0000A0" valign="top"><input TYPE="button" VALUE="阅 读" onClick="nextMessage()"></td>
</tr>
</table>
</form>
脚本说明:
第一步:把如下代码加入<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="28" wrap="yes"></textarea> </td>
</tr>
<tr align="center">
<td width="40%" valign="top" bgcolor="#0000A0"><input TYPE="button" VALUE="公告栏" onClick="lastMessage()"></td>
<td width="30%" bgcolor="#0000A0" valign="top"><input TYPE="text" value="共8条" SIZE="5" name="1"></td>
<td width="30%" bgcolor="#0000A0" valign="top"><input TYPE="button" VALUE="阅 读" onClick="nextMessage()"></td>
</tr>
</table>
</form>
标签:
可以文本显示的公告栏的js代码
无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月16日
2024年11月16日
- 2019明达发烧碟MasterSuperiorAudiophile[WAV+CUE]
- 蔡幸娟.1993-相爱容易相处难【飞碟】【WAV+CUE】
- 陆虎.2024-是否愿意成为我的全世界【Hikoon】【FLAC分轨】
- 关淑怡.2009-ERA【星娱乐】【WAV+CUE】
- 林忆莲《关于她的爱情故事》2022新世纪MQA 24K金碟限量版[WAV+CUE]
- 张雨生1993《一天到晚游泳的鱼》台湾G字首版[WAV+CUE][1G]
- 群星《试音五大女声》[WAV+CUE][1G]
- 魔兽世界wlk武器战一键输出宏是什么 wlk武器战一键输出宏介绍
- 魔兽世界wlk狂暴战一键输出宏是什么 wlk狂暴战一键输出宏介绍
- 魔兽世界wlk恶魔术士一键输出宏是什么 wlk恶魔术士一键输出宏介绍
- 医学爱好者狂喜:UP主把医学史做成了格斗游戏!
- PS5 Pro评分解禁!准备升级入手吗?
- 我们盘点了近期火热的国产单机游戏!《琉隐神渡》等 你期待哪款?
- 2019年第12届广州影音展双碟纪念版ADMS2CD[MP3/WAV]
- 黄安《救姻缘》台首版[WAV+CUE]