时间:2021-07-01 10:21:17 帮助过:1人阅读
本文实例讲述了JS仿Windows开机启动Loading进度条的方法。分享给大家供大家参考。具体实现方法如下:
代码如下:<html>
<title>JS仿Windows开机启动的Loading进度条</title>
</head>
<body style="margin:0;background-color:#5279CE;" scroll=no>
<table id=lw style="display:block;position:absolute;top:0;left:0;z-index:1;height:;width:" border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="100%" bgcolor="#5279CE" align="center"><font face="Wingdings" style="font-size:240px;color=#000000">Y</td>
</tr>
<tr>
<td height="10" bgcolor="#3F5FB2">
<SCRIPT language=jscript>
elt="0123456789ABCDEF";
var sTBHTMLS="";
var sTBHTMLE="";
for(var i=0;i<0xFF-0x99;i+=1)
{
var cr="";
var l;
var sTBHTML="";
l=i+0x99;
for(var j=0;j<2;j++)
{
var n=l % 16;
l=l >> 4;
cr=elt.charAt(n)+cr;
}
l=i+0x33;
for(var j=0;j<2;j++)
{
var n=l % 16;
l=l >> 4;
cr=elt.charAt(n)+cr;
}
l=i;
for(var j=0;j<2;j++)
{
var n=l % 16;
l=l >> 4;
cr=elt.charAt(n)+cr;
}
var w=i>(0xFF-0xA0)?8:4
sTBHTML="<span style='height:10;width:"+w+";background-color:#"+cr+";margin:0;padding:0'></span>"
sTBHTMLS+=sTBHTML;
sTBHTMLE=sTBHTML+sTBHTMLE;
}
var sTBHTML=sTBHTMLS+sTBHTMLE;
document.write("<marquee id='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>
<td width="100%" height="20%" bgcolor="#ECF0FF"><center><span id=load_txt style="font-size:12px;"><b id=showtxt style="color:red;font-size:12px;line-height:138%;">载入中,请稍候……</b></span></center>
<p align="center" style="font-size:9pt;">CopyRight@</p></td>
</tr>
</table>
<SCRIPT LANGUAGE="JavaScript">
<!--
var finderror = false;
function gopage()
{
if(document.readyState=="complete")
{
showtxt.innerHTML="载入中,请稍候……"
loading.style.display="none";
}
}
//-->
</SCRIPT>
</body>
</html>
希望本文所述对大家的javascript程序设计有所帮助。