﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>19~Blog &#124; &#187; 模拟页面加载</title>
	<atom:link href="http://www.ll19.com/tag/webloading/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ll19.com</link>
	<description>今天总是好过昨天~原来，冥冥之中，自有天意。</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:46:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>模拟页面加载的进度条</title>
		<link>http://www.ll19.com/web_loading.html</link>
		<comments>http://www.ll19.com/web_loading.html#comments</comments>
		<pubDate>Fri, 06 Mar 2009 06:17:04 +0000</pubDate>
		<dc:creator>19.</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[模拟页面加载]]></category>

		<guid isPermaLink="false">http://www.ll19.com/?p=164</guid>
		<description><![CDATA[模拟页面加载的进度条 因为我们不能得到整个页面的大小和当前加载了多少，所以只能来模拟页面的加载进度。我这里提供了一个FLASH LOADING BAR来模拟页面的加载进度，点击下方的地址下载。 1.3版本包括编译好的FLASH及使用实例，解决了整个页面全部加载完毕后，FLASH LOADING BAR还没有加载完毕的问题（这种情况一般很少发生，而且这种情况就说明你的整个页面流很小，完全没必要给对方以提示了~），即一定要执行最后一次的CALL（提供的例子用监听模拟整个页面加载过程，请在WEB环境下测试！）。当然如果用JS+CSS做就不会有这种情况发生，不过相比较FLASH的动画效果要更好，各有优缺点吧。 1.2和1.0包括FLASH BAR的源文件，需要源文件可以下载这两个版本。 如果你想看效果的话可以刷新当前页面，左上角就会出现提示页面的加载进度（清空缓存的情况下最明显，可以清空缓存再刷新测试，请不要点击其他链接测试，站点全部是AJAX加载，由于AJAX默认是异步传输，所以在AJAX的时候不能用此方法来模拟页面加载的进度）。 &#124; 下载地址(1.3) &#124; 源文件下载地址(1.2) &#124; 源文件下载地址(1.0) &#124; 由于站点的JS较大，很多的函数是在页面全部完成加载后才执行的，所以这样做可以给浏览者以相关的提示。 使用方法，拿自己的站点举例，也可以参考1.3版本中的实例：首先head标签只引入LOADING需要的CSS和JS~ 1 2 &#60;link href=&#34;loading.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34; /&#62; &#60;script type='text/javascript' src='loadingbar.js'&#62;&#60;/script&#62; 注：其他的CSS,JS文件不需要在head上就引入。由于页面是从上往下执行，所以你要明白到什么地方会加载什么，差不多加载的进度是什么。之后在BODY一开始就引入这个LOADING BAR，注意ID： 1 2 3 4 5 6 7 8 9 &#60;body&#62; &#60;div id=&#34;loadingbar&#34;&#62; &#60;object id=&#34;loadingBarFlash&#34; type=&#34;application/x-shockwave-flash&#34; data=&#34;http://www.ll19.com/glll/19_loading/loading_19.swf&#34; width=&#34;100%&#34; height=&#34;50&#34;&#62; &#60;param name=&#34;movie&#34; value=&#34;http://www.ll19.com/glll/19_loading/loading_19.swf&#34; /&#62; &#60;param name=&#34;BGCOLOR&#34; [...]]]></description>
		<wfw:commentRss>http://www.ll19.com/web_loading.html/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>

