爱易网
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 浏览次数:20146 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 第一步:把如下代码加入<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)
上一篇:狡猾的按钮特效
下一篇:逐字出现的信息条
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
百视通:Xbox One汉化获批 游戏迷欢呼吧
银河证券王锦炎:金融业如何使用大数据
国美痛批网购七宗罪 用短暂盈利输了未来
谷歌安卓全球副总裁为何跳槽中国企业小米?
iPhone 6 Plus要召回是谣言
这一次,微软将带给我们什么惊喜?
搜狐与奇虎360或结盟对抗BAT
Line风靡亚洲,在北美却进展缓慢
陈天桥之鉴:产品创新被扼杀那些事
推荐阅读
更多>
虚拟运营商流量不清零吸引用户 盈利待明
IT时代周刊总编辑曹健:投资人刘志硕印象记
苹果MacBook Air劣势渐显 或推新产品改变命运
Line风靡亚洲,在北美却进展缓慢
马云自称在美国曾被绑票
中电信国际漫游费下调85% 世界杯上网28元/天
三星起诉LG在冰箱广告中玷污其企业笼统
诺基亚称不会更名“微软移动” 5月还将发布新品
网络旅行游记被曝插入"软广告" 个别人士月入数万
国美苏宁线上首度正面PK 京东列席4月电商战
富士康人事故骚动方寸 不惜血本下注电商
Kindle入华遭遇国内厂商“围剿 ” 电信也参战
历史惊人相似:如今的库克 曾经的鲍尔默
联想架构调整后:Think品牌或推智能手机
华为美国推出电商网站 发售Mate 2LTE版
迅雷高管解读财报:收购快盘可快速融入小米
惠普中国转型只是缩影 未来开展不可预期
传苹果与雅虎协作信息提供 进一步摆脱谷歌
FDD牌照12月将发放 联通电信双4G反击中移动
华为坚持不上市究竟为何?不差钱也不想冒风险