爱易网
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 浏览次数:20144 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>爱易网网页特效演示,打字效果的文字切换</title> </head> <body> <script language="JavaScript1.2"> <!-- /* Typing Scroller Submitted by bengaliboy00@hotmail.com (hp: http://www.angelfire.com/nt/bengaliboy/) With modifications by Dynamicdrive.com For full source code, usage terms, and 100s more scripts, visit http://dynamicdrive.com */ //设置滚动的内容 var line=new Array() line[1]="欢迎光临网页特效" line[2]="http://linkweb.cn/js" line[3]="提出宝贵意见" line[4]="希望你喜欢这种模式" line[5]="再次感谢你的光临" //设置字体大小 var ts_fontsize="16px" //--Don't edit below this line var longestmessage=1 for (i=2;i<line.length;i++){ if (line[i].length>line[longestmessage].length) longestmessage=i } //Auto set scroller width var tscroller_width=line[longestmessage].length lines=line.length-1 //--Number of lines //if IE 4+ or NS6 if (document.all||document.getElementById){ document.write('<form name="bannerform">'); document.write('<input type="text" name="banner" size="'+tscroller_width+'"'); document.write(' style="background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">'); document.write('</form>'); } temp="" nextchar=-1; nextline=1; cursor="\\" function animate(){ if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){ nextline++; nextchar=-1; document.bannerform.banner.value=temp; temp=""; setTimeout("nextstep()",3000)} else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){ nextline=1; nextchar=-1; document.bannerform.banner.value=temp; temp=""; setTimeout("nextstep()",3000)} else{ nextstep()}} function nextstep(){ if (cursor=="\\"){ cursor="|"} else if (cursor=="|"){ cursor="/"} else if (cursor=="/"){ cursor="-"} else if (cursor=="-"){ cursor="\\"} nextchar++; temp+=line[nextline].charAt(nextchar); document.bannerform.banner.value=temp+cursor setTimeout("animate()",100)} //if IE 4+ or NS6 if (document.all||document.getElementById) window.onload=animate // --> </script> </body> </html>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:随日期变换的文本
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
玩游戏式的趣味戒烟App:Kwit
“扫黄打非”下9158否认遭整顿
广电总局回应美剧下架:不是所有信息可公开
TD是完成中国梦的一个契机
中移动一季度净利大降:手机补贴增长过快
雅安地震 绝不宽恕应用人们爱心的骗子!
电信运营商员工涌入虚拟运营商,待遇差距多大?
传搜狗估值12亿美元 与360谈判进入白热化
国内云服务商存在尴尬:“远程机房+移动大硬盘”模式
推荐阅读
更多>
特斯拉技术专利开放,要革自己的命?
苹果收购Beats交易或将延期尚需解决5大问题
支付宝钱包支持医保移动缴费 广州成首个试点
微软确认 Surface 计划更多尺寸和LTE 版本
华为美国推出电商网站 发售Mate 2LTE版
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
FB上广告费用昂贵而且效果不及Twitter
微软谷歌高层访韩面前:忌惮三星的崛起
OPPO Find7体验测 Find7综测
英特尔涉嫌垄断 欧盟或开出史上最高罚单
P2P平台科迅网疑“跑路” 涉及金额超2700万
传苹果中移动达成协议:新iPhone兼容TD制式
喜大普奔:2016年国内乘客有望在飞机上使用手机
广电总局回应美剧下架:不是所有信息可公开
网易微博将正式关闭 用户迁至轻博客LOFTER
电信设备商淘金中国4G:华为中兴领衔
看病也能用支付宝了 马云的又一盘大棋
微信今天大面积崩溃 腾讯:因光缆施工被挖断
京东终于想明白,这些年错过的财运,都藏在女人的时装下
传三星为赢得新兴市场:推廉价版Note3