首  页  |  酷站  |  精品网站  |  原创作品秀  |  网络学院   |  信息中心  |  艺术设计  |  求职招聘  |  建站资源  |  服装网站  |  论坛  |  设计部落  |  网站综合
个人网页  商业网站  业界动态  设计赛事  网站资源  下载专区  设计欣赏  CG-插画  JS特效  娱乐  国际品牌  知名品牌  服装院校  专题欣赏  SEO  BANNER
域名注册 虚拟主机 广州网站建设 广州网页设计 IDC赞助 设计资源下载 虚拟主机 域名注册 品牌网站建设 服装品牌网站建设 广告服务 网站推广 娱乐
当前位置:首 页 >> JS特效 >> 文本特效类 >> 文字播放完成后页面随即跳转

文字播放完成后页面随即跳转


中资源
转载请注明出处-中国设计秀-cnwebshow.com

要完成此效果需要两个步骤

第一步:把如下代码加入到<body>区域中

<script language="JavaScript">
Destination='http://www.cnwebshow.com/';

Messages=new Array()
Messages[0]="Welcome To JavaScript Fairyland";
Messages[1]="本站收罗了大JavaScript实例,可供网友下载";
Messages[2]="你可以添加更多条的显示";

FntFace='宋体';
FntColour='66FF33';
FntSize='4';

Speed=2000;

count=-1;
move=1;
if (document.all){
document.write('<div style="position:absolute;top:0;left:0;width:'+document.body.clientWidth+'">');
document.write('<center><div id="msg" style="position:relative;top:'+document.body.clientHeight/2+'"></div></center>');
document.write('</div>');
}
if (document.layers)
document.write('<layer name=nmsg top='+((window.innerHeight/2)-10)+'></layer>');
function Splash(){
TMR=setTimeout('Splash()',Speed);
if (count != Messages.length-1)
count=count+move;
else
{window.location.href=Destination;clearTimeout(TMR)}
if (document.all)
document.all.msg.innerHTML='<font face='+FntFace+' size='+FntSize+' color='+FntColour+'>'+Messages[count]+'</font>';
if (document.layers){ 
document.layers.nmsg.document.open();
document.layers.nmsg.document.write('<center><font face='+FntFace+' size='+FntSize+' color='+FntColour+'>'+Messages[count]+'</font></center>');
document.layers.nmsg.document.close();
}
}
</script>


第二步:把“onload="Splash()"”加在<body>标记里
例如:<body onload="Splash()">

转载请注明出处-中国设计秀-cnwebshow.com



投稿 】【对本文进行评论】 【字体: 】【发布于2007-08-27 16:18】

相关专题:暂无相关专题

上一篇:从下向上滚动的文字   下一篇:六种风格时间显示,一定有你喜欢的!
 认证LOGO下载
     
Copyright © 2005-2007 中国设计秀_网页设计教程_优秀网页设计欣赏_平面设计欣赏 All Right Reserved.
做最专业的设计服务网站,秀出自我,秀出精彩!中国设计秀,秀---无处不在!!
QQ:54292427  8208442 MSN:kingvisual#hotmail.com 交流群:9107036 3848215 8850631
粤ICP备05067046号 RSS