javascript重定向进度增量管理器

javascript重定向进度增量管理器,javascript,jquery,html,redirect,Javascript,Jquery,Html,Redirect,我附上了一个叫做欢迎的页面 基本上,这个页面将通过javascript重定向到另一个页面 它将被重定向到的页面可能需要1-2分钟才能响应,因此我需要在页面上的%增加,因为我们按照下面的js等待 我目前的问题是,一旦我们请求重定向页面,增量就不会继续 以下是html: <p>We are currently processing your application... please be patient...</p><br/> <cen

我附上了一个叫做欢迎的页面

基本上,这个页面将通过javascript重定向到另一个页面 它将被重定向到的页面可能需要1-2分钟才能响应,因此我需要在页面上的%增加,因为我们按照下面的js等待

我目前的问题是,一旦我们请求重定向页面,增量就不会继续

以下是html:

  <p>We are currently processing your application... please be patient...</p><br/>
        <center><img src="site/images/ajax-loader.gif">
        <br/><br/>
        <h2><span id='perouter'><span id="per">0</span>% complete</span>            </h2>


        <input type="hidden" name="" id="redirectdelay" value="2000">
         <!-- the redirect delay here will be taken from the config table -->
        <input type="hidden" name="" id="redirecturl" value="http://cmsdude.com/delay/delay.php?seconds=30">
         <!-- the redirect url here will be the welcome page -->
还有javascript:

<script>



function test(){
      //alert('ll');
}



function doTheUpdate(perc){
perc=perc+5;


if(perc<100){
setTimeout(function() {
doTheUpdate(perc);
}, document.getElementById("redirectdelay").value);

}else{
document.getElementById("perouter").innerHTML='Almost there - Please wait 1 minute...';
}

}
function updatePer(perc){

document.getElementById("per").innerHTML=perc;
if(perc<4){
setTimeout(function()
            { test(); }
     , 4000);

}
perc=perc+5;




if(perc<100){
setTimeout(function() {
doTheUpdate(perc);
}, document.getElementById("redirectdelay").value);

}else{
document.getElementById("perouter").innerHTML='Almost there - Please wait 1 minute...';
}
window.location.href = document.getElementById("redirecturl").value;


}

 updatePer(1);
</script>

感谢任何帮助???

如果您重定向到其他页面,您丢失了百分比,您可以传递perc值,如查询字符串:?perc=57,加载并继续后…感谢您的建议,但无需等待外部链接返回并回答我的呼叫