中国设计秀欢迎投稿
联网
平面设计 画册 VI欣赏 包装 CG-插画 搜索 个人网页 Alexa排名 CSS 建站资源 下载专区 JS特效 品牌服装 服装院校 专题欣赏 SEO 图标欣赏 专题
域名注册 虚拟主机 广州网站设计 域名注册 广州网站建设 上海网站建设 虚拟主机 广州网页设计 签名设计 虚拟主机 域名注册 acg王国 ACG玩家
求创科技
上海网麒科技
中国福网
数字引擎
招聘求职
中国互联
时代互联
中资源
当前位置:网站综合首页 >> 网页JS特效 >> 文本特效类 >> 文字播放完成后页面随即跳转

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

来源:中国设计秀    作者:    点击:1467     加入收藏    发表评论
0
顶一下
中国品牌设计网

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

第一步:把如下代码加入到<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()">

2007-08-27 16:18:00    出处:
热点文章/相关文章
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明 | 网站公告 | 友情链接 | 留言 | 旧版入口