JS仿Windows开机启动Loading进度条的方法
本文实例讲述了JS仿Windows开机启动Loading进度条的方法。分享给大家供大家参考。具体实现方法如下:
<html>
<title>JS仿Windows开机启动的Loading进度条</title>
</head>
<bodystyle="margin:0;background-color:#5279CE;"scroll=no>
<tableid=lwstyle="display:block;position:absolute;top:0;left:0;z-index:1;height:;width:"border="0"width="100%"cellspacing="0"cellpadding="0"height="100%">
<tr>
<tdwidth="100%"bgcolor="#5279CE"align="center"><fontface="Wingdings"style="font-size:240px;color=#000000">Y</td>
</tr>
<tr>
<tdheight="10" bgcolor="#3F5FB2">
<SCRIPTlanguage=jscript>
elt="0123456789ABCDEF";
varsTBHTMLS="";
varsTBHTMLE="";
for(vari=0;i<0xFF-0x99;i+=1)
{
varcr="";
varl;
varsTBHTML="";
l=i+0x99;
for(varj=0;j<2;j++)
{
varn=l%16;
l=l>>4;
cr=elt.charAt(n)+cr;
}
l=i+0x33;
for(varj=0;j<2;j++)
{
varn=l%16;
l=l>>4;
cr=elt.charAt(n)+cr;
}
l=i;
for(varj=0;j<2;j++)
{
varn=l%16;
l=l>>4;
cr=elt.charAt(n)+cr;
}
varw=i>(0xFF-0xA0)?8:4
sTBHTML="<spanstyle='height:10;width:"+w+";background-color:#"+cr+";margin:0;padding:0'></span>"
sTBHTMLS+=sTBHTML;
sTBHTMLE=sTBHTML+sTBHTMLE;
}
varsTBHTML=sTBHTMLS+sTBHTMLE;
document.write("<marqueeid='loading'scrollamount='30'direction='right'scrolldelay='1'height='4'style='width:100%;height:10;font-size:6px;background-color:#003399'>")
document.write(sTBHTML)
document.write("</marquee>")
</SCRIPT></td>
</tr>
<tr>
<tdwidth="100%"height="20%"bgcolor="#ECF0FF"><center><spanid=load_txtstyle="font-size:12px;"><bid=showtxtstyle="color:red;font-size:12px;line-height:138%;">载入中,请稍候……</b></span></center>
<palign="center"style="font-size:9pt;">CopyRight@</p></td>
</tr>
</table>
<SCRIPTLANGUAGE="JavaScript">
<!--
varfinderror=false;
functiongopage()
{
if(document.readyState=="complete")
{
showtxt.innerHTML="载入中,请稍候……"
loading.style.display="none";
}
}
//-->
</SCRIPT>
</body>
</html>
希望本文所述对大家的javascript程序设计有所帮助。