爱易网
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 浏览次数:20165 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 第一步:把如下代码加入<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)
上一篇:狡猾的按钮特效
下一篇:逐字出现的信息条
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
搜房网遭遇做空 利益保送成“猎杀”焦点
火狐手机发展前路:或被运营商绑架
联发科享用价钱战 专利难以摆脱高通
O2O成"唐僧肉":百度糯米抢食第一口令阿里腾讯颤抖
苹果多色彩!葫芦里究竟卖的什么药
“宽带中国”计划已正式上升为国家战略
美国电影协会在华起诉迅雷侵权 要求赔偿并道歉
微软提示XP只剩365天寿命:用户被绑架?
互联网情色众多 Facebook与9158态度大不同
推荐阅读
更多>
公信力消失:马航事件社交媒体传播之痛
天音通信170套餐试商用放号:流量两年不清零
云储存有多远:跨过数据安全问题即可到达
虚拟运营商前路迷茫 业界建议发力车联网
苹果6月20日发布iPhone5S 触摸屏概念股生动
苏宁双线同价遇难题:第一个吃螃蟹不轻松
戴尔新CEO名单曝光:惠普甲骨文高管在列
中国首台比特币ATM登陆上海 可购买不可兑换现钞
OPPO Find7体验测 Find7综测
iPhone 6 Plus要召回是谣言
Line风靡亚洲,在北美却进展缓慢
中移动落马高管盘点:广东移动成反腐重地
代工厂生活危机:“富士康们”何去何从?
三星手机在国内陷入困境:华为中兴小米紧追
微软很“捉急”:补贴Win8 重加末尾按钮
易迅大众点评缩水执行“七天后悔权”被约谈
百度吴恩达:图像和音视频搜索是人工智能新方向
估值增长9.8% 阿里IPO前市值达2450亿美元
曹国伟:微博将关注Facebook和Twitter
虚拟运营商温度有多高?降温OR升温内外有别