`
caozuiba
  • 浏览: 903032 次
文章分类
社区版块
存档分类
最新评论

如果服务器端执行时间很长,在客户端先显示等候画面

 
阅读更多

<html>
<head>
<title>梅花雪的页面加载</title>
<script language="javascript">
document.write('<div id=loadDiv style="padding-top:50; padding-left:50">'+'页面正在载入,请稍等<span id="loading"></span></div>');var setInterval1 = setInterval("loading.innerText += '.'",300);
var setInterval2 = setInterval("loading.innerText = ''",15000);
function window.onload()
{
hiddenDiv.style.display=""; //显示页面内容
loadDiv.removeNode(true);
clearInterval(setInterval1);
clearInterval(setInterval2);
}
</script>
</head>
<body>
<div id=hiddenDiv style="display:none">
<!--将网页所有的内容都放在这个div之内即可-->
</div>
</body>
</html>

-------------------------------------------------------------
摘自梅花雪帖子:http://topic.csdn.net/t/20040326/16/2890649.html

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics