斑竹,咋不滚动了?
<title>滚动条</title><style>
#loading{
width:300px;
background-color:#000;
border:2px solid #000;
}
#loadcss{
display:block;
background-color:#0df;
text-align:center;
}
</style>
</head>
<body onload="load">
<div id="loading">
<strong id="loadcss" style="width:33%;">33%</strong>
</div>
<script language="javascript">
var i=0
function load()
{
showload=setTimeout("setload()",500);
}
function setload()
{
i+=5;
if (i>=100)
{
clearTimeout(showlaod);
}
document.getElementById("loadcss").style.width=i+"%" ;
document.getElementById("loadcss").innerHTML=i+"%";
}
</script>
</body>