爱易网
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 浏览次数:20154 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 第一步:把如下代码加入<body>区域中 <script language=javascript> //Change the following 4 messages to your liking. var txt = "欢迎你的光临" var txt2 = "I love javascript" var txt3 = "记得要经常来呀" var txt4 = "谢谢你的光临" //Make sure that "def" is longer than your longest message var def = "_______________________________________" //Don't change any of the following var end = txt4.length var end2 = end / 2 var close = end2 var close2 = end2 var close3 = end var max2 = txt3.length var mid = max2 / 2 var max = txt2.length var msg var msg2 var msg3 var msg4 var msg5 var msg6 var word = 0 var word2 = txt.length var scroll = 0 var door = max var blink = 0 var blink2 = 20 var stay = 0 var timestay var time var time2 var doortime var timeblink var timescroll var timeblink2 var timeclose function Type() { if (word <= txt.length) { word++; msg = txt.substring(0, word); document.form1.text.value = msg time = setTimeout("Type()", 100) } else { word = 0; clearTimeout(time); Stay() } } function Stay() { if (stay==0) { document.form1.text.value = txt; stay = 1; timestay = setTimeout("Stay()", 1000) } else if (stay==1) { document.form1.text.value = txt; stay = 0; clearTimeout(timestay); Erase() } } function Close() { if(close2 <= end) { close -= 1; close2++; close3 -= 2; msg6 = txt4.substring(close, end2) + def.substring(0, close3) + txt4.substring(end2, close2); document.form1.text.value = msg6; timeclose = setTimeout("Close()", 100) } else { clearTimeout(timeclose); close = end2; close2 = end2; close3 = end; Stay2()} } function Stay2() { if (stay==0) { document.form1.text.value = txt4; stay = 1; timestay = setTimeout("Stay2()", 1300) } else if (stay==1) { document.form1.text.value = txt4; stay = 0; clearTimeout(timestay); Doors() } } function Erase() { if (word2 <= txt.length && word2 > 0) { word2 -= 1; msg2 = txt.substring(0, word2) document.form1.text.value = msg2 time2 = setTimeout("Erase()", 20)} else { word2 = txt.length; clearTimeout(time2); Close() } } function Doors() { if (door >= 0) { door -= 1; msg3 = txt2.substring(door, max) document.form1.text.value = msg3 doortime = setTimeout("Doors()", 100) } else { door = max; clearTimeout(doortime); Blink() } } function Blink() { if (blink==0) { document.form1.text.value = txt2; blink = 1; timeblink = setTimeout("Blink()", 200) } else if (blink==1) { document.form1.text.value = ""; blink = 2 ; timeblink = setTimeout("Blink()", 200) } else if (blink==2) { document.form1.text.value = txt2; blink = 3; timeblink = setTimeout("Blink()", 200) } else if (blink==3) { document.form1.text.value = ""; blink = 4; timeblink = setTimeout("Blink()", 200) } else if (blink==4) { document.form1.text.value = txt2; blink = 5; timeblink = setTimeout("Blink()", 200) } else if (blink==5) { document.form1.text.value = ""; blink = 0; clearTimeout(timeblink); Scroll() } } function Scroll() { if(scroll <= txt2.length) { msg4 = txt2.substring(scroll, txt2.length); document.form1.text.value = msg4; scroll++; timescroll = setTimeout("Scroll()", 100) } else { clearTimeout(timescroll); scroll = 0 Blink2() } } function Blink2() { if (blink2==20) { msg5 = txt3; document.form1.text.value = msg5; blink2 = 0; timeblink2 = setTimeout("Blink2()", 800) } else if (blink2==0) { msg5 = txt3.substring(0, mid) + def.substring(0, mid); document.form1.text.value = msg5; blink2 = 1; timeblink2 = setTimeout("Blink2()", 300) } else if (blink2==1) { msg5 = def.substring(0, mid) + txt3.substring(mid, max2); document.form1.text.value = msg5; blink2 = 2 ; timeblink2 = setTimeout("Blink2()", 300) } else if (blink2==2)
上一篇:狡猾的按钮特效
下一篇:逐字出现的信息条
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
中移动推动感地带3G网聊卡 火拼微信沃卡
智能手机:中国手机市场最受关注十五款产品清点
戴尔新CEO名单曝光:惠普甲骨文高管在列
华为坚持不上市究竟为何?不差钱也不想冒风险
独立工具APP:为亿级用户的商业化而愁
雅安地震 绝不宽恕应用人们爱心的骗子!
频繁自杀 折射媒体变革中的媒体人迷茫与压力并存
迪信通神秘免费服务揭谜底:充电宝免费带回家
三星维修新规:Galaxy S4主板进水也收费修
推荐阅读
更多>
网络音乐非片面收费 高晓松时间表难完成
都是300元内 乐视盒子与小米盒子对比体验
联发科享用价钱战 专利难以摆脱高通
创维冲击500亿梦想:转型硬件和内容供应商
十亿美元的告别礼:三星为何要大举重组?
清点:罗永浩推锤子ROM 小米打法遭模拟
高德百度地图免费背后:李彦宏暗斗马云周鸿祎
Facebook财报前瞻:投资者仍信心不足
同样的背景,罗永浩和雷军到底有什么不同?
PC迎9年来出货量新低 平板电脑渐成主流
传4G牌照国庆节前后发放 TD-LTE制式优先
估值增长9.8% 阿里IPO前市值达2450亿美元
曹国伟:微博将关注Facebook和Twitter
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
手游市场乱象丛生 受资本热捧野蛮成长
史玉柱此刻离任:营销巨匠为新游戏炒作?
传陌陌或12月赴美IPO 估值约30亿美元
英特尔VS苹果:移动芯片大战
一个非脑残米粉的思考:小米“成功之道”如何炼成
美图手机2问世 三大问题令其市场销量堪忧