状态栏多条提示字符出现

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

<!-- http://www.knowsky.com/js -->

<!-- bbs http://www.knowsky.com/bbs-->

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

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

<script language="JavaScript">

Destination='http://www.knowsky.com/';

Messages=new Array()

Messages[0]="Welcome To 网页教学网";

Messages[1]="本站收罗了网页制作学习、网页特效、动画制作、建站指南、网络编程";

Messages[2]="该特效代码你可以添加多个特效,欢迎访问http://www.knowsky.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()">

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有  導航