叶子谷- 网页教程

RSS订阅 站长资讯通告:
搜索: 您现在的位置: 叶子谷 >> 网页特效 >> 综合特效代码 >> 正文

网页特效集锦

2008-06-10 13:50:46 来源:网络 作者:佚名 【 点击:



19、打字机打彩色文字
说明:文本自动向上循环滚动,鼠标放到上面还会暂时停下来。
代码:
<DIV class=ttl1 id=ttl0><SPAN class=ttl1></SPAN></DIV>
<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 ycrc_com_cn(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("ycrc_com_cn('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay);
}
}

function www_ycrc_com_cn() {
ycrc_com_cn(dispStr[0], 0, 'ttl0', 'ttl1', '#339933', '#99FF33', 50, 0);
}
www_ycrc_com_cn();
// -->
</SCRIPT>

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

Tags: 网页特效  
责任编辑:cptedu
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】   
    姓 名: * Oicq:
    评 分: 1分 2分 3分 4分 5分
    评论内容:
    广告也精采
    热门文章
    设为首页 -加入收藏 - 联系我们 - 友情链接 - 版权声明 - 管理登陆