要完成此效果需要兩個(gè)步驟
第一步:把如下代碼加入到區(qū)域中
<script language="JavaScript">
Destination='http://www.jojoo.net/';
Messages=new Array()
Messages[0]="Welcome To JavaScript Fairyland";
Messages[1]="本站收羅了大JavaScript實(shí)例,可供網(wǎng)友下載";
Messages[2]="你可以添加更多條的顯示";
FntFace='宋體';
FntColour='66FF33';
FntSize='4';
Speed=2000;
count=-1;
move=1;
if (document.all){
document.write('
');
document.write('
');
document.write('
');
}
if (document.layers)
document.write('
');
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='
'+Messages[count]+'';
if (document.layers){
document.layers.nmsg.document.open();
document.layers.nmsg.document.write('
'+Messages[count]+'');
document.layers.nmsg.document.close();
}
}
</script>
第二步:把“onload="Splash()"”加在標(biāo)記里
例如: