热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

可以文本显示的公告栏-PHP源码

ec(2);一个可以文本显示的公告栏,可以在多处使用,绝对不可错过!脚本说明:第一步:把如下代码加入<head>区域中<scriptlanguage"JavaScript"><!--ActivateCloakingDevicevari0;usedtocyclethrumessagesvar

一个可以文本显示的公告栏,可以在多处使用,绝对不可错过!
脚本说明:
第一步:把如下代码加入区域中

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;
}
推荐阅读
author-avatar
TheKing小狼
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有