LOAD进度条代码
function DoubleAnimation(target,targetProperty,from,to,Duration) {
this.Begin=function anonymous()
{
target[targetProperty]=from;
var starttime=new Date();
setTimeout(StoryBoard(),1);
function StoryBoard()
{
return function()
{
var now=new Date();
var d=now.getTime()-starttime.getTime();
target[targetProperty]=Math.round(from+(to-from)*d/Duration);
if(d
加载中请稍候......
");
var story=new
DoubleAnimation(document.getElementById(ID+"highlight").style,"left",-100,324,20
00)
var stophandle=setInterval(story.Begin,2000);
this.set=function(percentage)
{
document.getElementById(ID+"pb").style.width=Math.round(percentage*329/100);
}
}
////////////////////////////////////////////////////////// /
//////////////////////////////////////////////////////////
////////////////////////////////////////////////////////// /
////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////// /
//////////////////////////////////////////////////////////
var pb1=new ProgressBar("ok");
var p=0;
function loading()
{
pb1.set(p+=0.3);
if(p<100)
setTimeout(loading,2);
else
window.location.href="";
}
loading();