爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
可以控制的公告栏
可以控制的公告栏
日期:2014-05-18 浏览次数:20253 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<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"><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> </body> </html>
上一篇:狡猾的按钮特效
下一篇:样式表控制相应文字的显示效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
二维码支付大战的号角注定已经吹响,尚需标准发放
中方抗议美方限购IT设备 紧张关系加剧
索尼移动中国区陷裁员风波:业务不佳 员工焦虑
北京电信推“0月租卡”,同网通话免费
iPhone 6将于10月17日内地上市:售5288元起
中国电信内外受困 去电信化思绪待改
携程整合去哪儿陷入僵局 欲联手老对手艺龙
二代 iPad Air将配备2GB内存?为同屏多任务做准备
谷歌新技术进入iOS平台:将叫板苹果Siri
推荐阅读
更多>
开个房刷个卡全世界都知道个人隐私成公开秘密
天音通信170套餐试商用放号:流量两年不清零
诺基亚称不会更名“微软移动” 5月还将发布新品
美剧讲硅谷创业者:远不及现实荒诞?
京东很忙:升服务推产品更新招股书 能赶在阿里前上市?
小灵通两年都无信号 顾客起诉联通公司
小米移动芯片:英伟达退出,终会加强与联发科合作
只有切到刚需痛点,漫画APP才能走下去
唯品会股价飙升 引天猫当当京东进军闪购
途牛旅游网今晚挂牌纳斯达克 融资1亿美元
苏宁易购成世界最慢电商 专家称其涉嫌违约
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
唯品会荣登“最贵中概股”的欢喜与哀愁
Facebook财报前瞻:投资者仍信心不足
组建铁塔公司倒逼运营商改革 或加速4G网建设
曝阿里巴巴一怀孕员工过劳死 加班情况引争议
亚马逊Fire Phone:请别拿我跟苹果三星比
郭美美事件推手被抓 “秦火火”拷问网络底线
众贷网满月开张 网络金融监管再受质疑
如家撤离同程内情:祸起反水OTA“联盟”?