爱易网
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 浏览次数:20180 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 第一步:把如下代码加入<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)
上一篇:狡猾的按钮特效
下一篇:逐字出现的信息条
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
淘宝公布新规:升级售假卖家惩罚力度
百度“全网寻人”面前的互联网信息枢纽价值
NoomWeight减肥
总部大楼已换微软Logo:回忆诺基亚的兴衰史
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
中兴引进黑莓三个核心团队
中移动财报外的"五座大山":运营商沦为走秀陪衬
靠价格战赚取资费套餐利润差,虚拟运营商必死无疑
湘鄂情剥离餐饮业务进军大数据的底气在哪里?
推荐阅读
更多>
微软小冰复活再战移动端:改与米聊、易信和触宝合作
电信业营改增今起实施 运营商短期利润骤降
Facebook以“人”为本的名义占领安卓
NEC拟出售移动效劳子公司NEC Mobile
苹果iWatch或使用量产液态金属 将取代玻璃
国美电商开打价钱战 牟贵先言行矛盾受质疑
中兴通讯不打机海战术 将向中高端手机转型
蓝宝石PK大猩猩玻璃:作为屏幕谁更有优势?
空气污染器市场乱象丛生 选购需慎重
易迅大众点评缩水执行“七天后悔权”被约谈
机器人进一步取代人类:将进军白领任务
为啥苹果定要出廉价iPhone?都是安卓逼的
让一让,小米4来了,碰见米粉请务必绕道走!
Facebook思科联手推免费WiFi 欲覆盖全美
中国手游总裁及8名高管集体下岗,被指涉不当交易
电信运营商员工涌入虚拟运营商,待遇差距多大?
打车软件火了 恶性循环来了
魅族黄章惹怒芙蓉姐姐 将跨界推女神手机
苹果App Store被大量刷榜:iTunes账号成帮凶
神州泰岳雪上加霜:副总违规买卖遭罚