想要一个累死进度条或者“加载中”类似功能。
因为我的页面点击某个按钮后,在后台的操作很耗时,所以想人性化一点,给个正在操作的提示。但是不要那种纯粹是等一段时间的那种进度条。我想要的是,在这个“进度条”(或其他)在加载的时候,后台的程序也在运行,而不是在进度条走完之后才去执行后台程序。“进度条”消失时,数据也刚好加载完。
又会的帮忙看看
因为我的页面点击某个按钮后,在后台的操作很耗时,所以想人性化一点,给个正在操作的提示。但是不要那种纯粹是等一段时间的那种进度条。我想要的是,在这个“进度条”(或其他)在加载的时候,后台的程序也在运行,而不是在进度条走完之后才去执行后台程序。“进度条”消失时,数据也刚好加载完。
又会的帮忙看看
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Loading Status Bar</title>
<meta name="robots" content="noindex,follow" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
document.writeln("<style type=\"text\/css\">#loading{width:100px;height:20px;background:#A0DB0E;padding:5px;position:fixed;left:0;top:0}#loading div{width:1px;height:20px;background:#F1FF4D;font:10px/20px Arial}<\/style>")
</script>
</head>
<body>
<noscript>Javascript</noscript>
<div id="loading"><div></div></div>
<script type="text/javascript">$("#loading div").animate({width:"16px"}).text("16%")</script>
<script type="text/javascript">setTimeout(function(){$("#loading div").animate({width:"34px"}).text("34%")},500)</script>
<script type="text/javascript">setTimeout(function(){$("#loading div").animate({width:"67px"}).text("67%")},1000)</script>
<script type="text/javascript">setTimeout(function(){$("#loading div").animate({width:"82px"}).text("82%")},1500)</script>
<script type="text/javascript">setTimeout(function(){$("#loading div").animate({width:"100px"}).text("100%")},2000)</script>
<script type="text/javascript">setTimeout(function(){$("#loading").hide(500)},3000)</script>
</body>
</html>