有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br>
<!-- http://www.webjx.com/js -->
<!-- bbs http://www.webjx.com/bbs-->
要完成此效果需要两个步骤
第一步:把如下代码加入到<body>区域中
<script language="JavaScript">
Destination='http://www.webjx.com/';
Messages=new Array()
Messages[0]="Welcome To 网页教学网";
Messages[1]="本站收罗了网页制作学习、网页特效、动画制作、建站指南、网络编程";
Messages[2]="该特效代码你可以添加多个特效,欢迎访问http://www.webjx.com";
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()">
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]