爱易网
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 浏览次数:20228 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<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>
上一篇:狡猾的按钮特效
下一篇:样式表控制相应文字的显示效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
携程艺龙联手死磕同程 价钱烽烟蔓延至机票
华为美国推出电商网站 发售Mate 2LTE版
苹果6月20日发布iPhone5S 触摸屏概念股生动
曹国伟:微博将关注Facebook和Twitter
HTC与苹果三星距离扩展 C2B形式成新武器
携程整合去哪儿陷入僵局 欲联手老对手艺龙
高通拼抢国际芯片市场 联发科海外拓展难安心
酷派首抓4G时机大丰收,未来份额必降无疑
HTC以品牌营销突围 专家建议改变经营思路
推荐阅读
更多>
史玉柱谈创业:5大建议 失败的教训最真实
网络音乐非片面收费 高晓松时间表难完成
FB上广告费用昂贵而且效果不及Twitter
打车App就是下一个团购骗局!?
传诺基亚5月14日发布会推出Lumia 950
智能手机:中国手机市场最受关注十五款产品清点
同样的背景,罗永浩和雷军到底有什么不同?
马云自称在美国曾被绑票
锐迪科将以9.25美元/ADS价钱出售835万份ADS
广东移动高层受调查 中移动或现更大反腐风暴
英特尔技术高管离任 电视业务或受影响
苹果股价突破100美元大关:投资者看好iPhone 6
新闻早8点》Facebook失手发布Snapchat类应用
富士康欲用机器人产iPhone 6
OPPO创始人陈明永:我们是怎么做营销的
中移动五大基地将整改成公司:被指易滋生腐败
中电信国际漫游费下调85% 世界杯上网28元/天
微软提示XP只剩365天寿命:用户被绑架?
英特尔IDF峰会启示:释放移动互联的信号
电信设备商淘金中国4G:华为中兴领衔