【
繁体中文
】
【
设为首页
】
【
加入收藏
】
首页
系统
设计
网络
时尚
探索
网速测试
智商测试
论坛
网络首页
|
网页制作
|
网站建设
|
搜索
推荐
公告
推荐文章
·
一个可以用来做招牌字的特效
·
字体效果
·
文本自动向上循环滚动,...
·
设定时间自动刷新页面或...
·
使超链接不显示下划线
·
在输入框中输入的一段英...
·
在网页中添加上下滚动的文字
·
带超链接滚动显示文字的...
·
可移动的显示层
·
打字机打彩色文字
热点文章
广告
当前位置:
网络首页
>>
网页制作
>>
网页特效
>>
文本操作
>> 打字机打彩色文字
打字机打彩色文字
2007-12-12 10:29:09 作者:未知 来源:互联网 浏览次数:
14
文字大小:【
大
】【
中
】【
小
】
关键字:
打字机
第一步:把如下代码加入<head>区域中 <SCRIPT language="JavaScript"> <!-- var layers = document.layers, style = document.all, both = layers || style, idme=908601; if (layers) { layerRef = 'document.layers'; styleRef = ''; } if (style) { layerRef = 'document.all'; styleRef = '.style'; } function writeOnText(obj, str) { if (layers) with (document[obj]) { document.open(); document.write(str); document.close(); } if (style) eval(obj+'.innerHTML= str'); } //以下是输出的内容,自己修改即可。 var dispStr = new Array( "<font color=red size=3>欢迎光临“求奥网页特效”...</font><br><font color=green size=3>你知道怎样在你的网页中做一个很酷的网页菜单吗?</font><br><font color=red size=3>你知道怎样让你的网页背景向上或向下移动吗?</font><br><font color=blue size=3>你知道怎样在你的主页中任意位置显示一个时钟吗?</font><br><font color=red size=3>你知道怎样在主页中做特效文字吗?</font><br><font color=black size=3>你知道怎样做一个很cool的日历吗?</font>" ); var overMe=0; function txtTyper(str, idx, idObj, spObj, clr1, clr2, delay, plysnd) { var tmp0 = tmp1 = '', skip = 0; if (both && idx <= str.length) { if (str.charAt(idx) == '<') { while (str.charAt(idx) != '>') idx++; idx++; } if (str.charAt(idx) == '&' && str.charAt(idx+1) != ' ') { while (str.charAt(idx) != ';') idx++; idx++; } tmp0 = str.slice(0,idx); tmp1 = str.charAt(idx++); if (overMe==0 && plysnd==1) { if (navigator.plugins[0]) { if (navigator.plugins["LiveAudio"][0].type=="audio/basic" && navigator.javaEnabled()) { document.embeds[0].stop(); setTimeout("document.embeds[0].play(false)",100); } } else if (document.all) { ding.Stop(); setTimeout("ding.Run()",100); } overMe=1; } else overMe=0; writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2+"'>"+tmp1+"</font></span>"); setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay); } } function init() { txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', '#339933', '#99FF33', 50, 0); } // --> </SCRIPT> 第二步:把如下代码加入<body>区域中 <DIV class=ttl1 id=ttl0><SPAN class=ttl1></SPAN></DIV> 第三步:把<body>改为 <body bgcolor="#fef4d9" onload="onload=init()">
运行代码
复制代码
另存代码
发表评论
加入收藏
告诉好友
打印本页
关闭窗口
返回顶部
相关文章