<script> var _LoadingHtml = "<div id='loadingDiv'><div class='loading'><img src='static/img/loading2.gif' class='img-responsive'></div><p>拼命加载,请稍等...</p></div>"; document.write(_LoadingHtml); document.onreadystatechange = completeLoading; //加载状态为complete时移除loading效果 function completeLoading() { if (document.readyState == "complete") { var loadingMask = document.getElementById('loadingDiv'); loadingMask.parentNode.removeChild(loadingMask); } } </script>
网页资源加载动画
最新推荐文章于 2024-07-16 15:32:05 发布