fei 发表于 2007-4-27 11:18:53

***页面特效***文字播放后页面随即自动跳转

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
要完成此效果需要两个步骤

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

<script language="javascript">
destination='http://www.jojoo.net/';

messages=new array()
messages="welcome to javascript fairyland";
messages="本站收罗了大javascript实例,可供网友下载";
messages="你可以添加更多条的显示";

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+'</font>';
if (document.layers){
document.layers.nmsg.document.open();
document.layers.nmsg.document.write('<center><font face='+fntface+' size='+fntsize+' color='+fntcolour+'>'+messages+'</font></center>');
document.layers.nmsg.document.close();
}
}
</script>


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










--------------------------------------

拥有三人行论坛管理系列软件,一个人就可以管理一个论坛的更新维护。还能使您的论坛有千人在线的真实火暴效果,让您不在为论坛因没有人气而留不住会员而烦恼,使您的论坛早日成为一流的论坛。详情请登陆网站:http://www.cnsrx.cn 三人行论坛管理软件,站长必备的专业好工具。(您使用的是免费版本,购买收费版本后,将不带广告。业务QQ:247216 44985227)
页: [1]
查看完整版本: ***页面特效***文字播放后页面随即自动跳转