爱易网
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 浏览次数:20162 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<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>
上一篇:狡猾的按钮特效
下一篇:样式表控制相应文字的显示效果
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
苏宁易购成世界最慢电商 专家称其涉嫌违约
迅雷欲3300万美元收购金山快盘 预计9月完成
苹果30亿美元收购Beats
Twitter收购印度手机营销公司ZipDial
银联布局二维码支付,“擦边球”生态不能自救
唯品会荣登“最贵中概股”的欢喜与哀愁
支付宝27日晚间曝严重破绽:买卖记载可被搜索
诺基亚培育低端机市场 迂回战术要挟中华酷联
P2P平台科迅网疑“跑路” 涉及金额超2700万
推荐阅读
更多>
网络文学竞争白热化 百度多酷文学网上线
刘强东向总理建言:打击有组织有规模的售假商家
苹果收购Beats交易或将延期尚需解决5大问题
《归来》遭视频网盗播 乐视网状告小米盒子侵权
欧洲6万人起诉Facebook隐私侵权
宽带中国战略明确 运营商建设成本超6000亿
支付宝被曝严重破绽 隐私平安再受质疑
扎克伯格华裔妻子首度亮相电视节目畅谈情史
工商总局开查电商“七日退货”
腾讯为何在与阿里百度的收购比赛中当看客?
开个房刷个卡全世界都知道个人隐私成公开秘密
固话上网卡或将实名制 运营商泄露用户信息将被罚
【晚报】女子泰国游晒10照片 流量费2000
淘宝公布新规:升级售假卖家惩罚力度
MIUI,有了它小米就无惧对手
同程旅游融资后变土豪 如何烧钱占领市场?
惠普董事长莱恩辞职 为巨额财务减记埋单
Google要求硬件厂商捆绑预装应用的协议曝光
央行暂停二维码支付及虚拟信用卡 支付宝微信不知情
支付宝27日晚间曝严重破绽:买卖记载可被搜索