开发者

<body onload="function()"> makes my animatedImage stuck

I have a preload page with an animation.

<body onload="showSpinner()">
    <h3>Please Wait...</h3>
    <s开发者_StackOverflow中文版cript>        
    function showSpinner() {
        showProgress();                      
        window.location.href = 'Report.aspx'; 
    }      
    </script>
</body>

When my function gets accessed and window.location.href fires, the animation freeze. Is there a way to prevent this?


There is no way to control the "freeze" in your animation.

The moment you are changing the location of the page, the browser fetches the new page and stops all processing of the current page, including animations. IIRC, this behaviour is not consistent across browsers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜