爱易网
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 浏览次数:20176 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<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>
上一篇:狡猾的按钮特效
下一篇:样式表控制相应文字的显示效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
柳传志马云陷舆论漩涡:请不要辜负这个时代
神州电脑中止IPO面前:再被质疑财务造假
揭秘:阿里巴巴“无人认领”的三成股权都归谁
TD是完成中国梦的一个契机
苹果售后生态链乱象:供需失衡价钱不一
公信力消失:马航事件社交媒体传播之痛
京东确定IPO定价区间 最高募资16.9亿美元
虚拟运营商温度有多高?降温OR升温内外有别
百度对糯米来说到底意味着什么?
推荐阅读
更多>
NEC拟出售移动效劳子公司NEC Mobile
广电地方营业厅的一句“罚停”,暴露出了他们的本质
携程艺龙联手死磕同程 价钱烽烟蔓延至机票
分析称iPhone 6明年初发布 屏幕变为4.8吋
苏宁易购成世界最慢电商 专家称其涉嫌违约
英特尔技术高管离任 电视业务或受影响
迅雷欲3300万美元收购金山快盘 预计9月完成
同样的背景,罗永浩和雷军到底有什么不同?
空气污染器市场乱象丛生 选购需慎重
让一让,小米4来了,碰见米粉请务必绕道走!
做大电影,阿里控股公司在港成立影业集团
优酷土豆携手新浪微博 谋攻移动视频失地
佳能利润大跌三成 智能终端倒逼相机厂商转型
微软确认 Surface 计划更多尺寸和LTE 版本
八位知名设计师评iOS7:新鲜但复杂
华为美国推出电商网站 发售Mate 2LTE版
FB上广告费用昂贵而且效果不及Twitter
安全服务机构:公布2014年度最糟糕的25个密码
OPPO创始人陈明永:我们是怎么做营销的
HDS发布《2013中国CIO洞察白皮书》