<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>评论：通过 Dom 方法提高 innerHTML 性能</title>
	<atom:link href="http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/</link>
	<description>落草为根—专注前端技术&#38;&#38;关注用户体验</description>
	<lastBuildDate>Tue, 09 Mar 2010 07:28:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：asdz</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-5132</link>
		<dc:creator>asdz</dc:creator>
		<pubDate>Tue, 03 Nov 2009 03:53:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-5132</guid>
		<description>&lt;code&gt;
oldEl.parentNode.replaceChild(newEl, oldEl);
used to restore variable references. */ return newEl; };
&lt;code&gt;</description>
		<content:encoded><![CDATA[<p><code><br />
oldEl.parentNode.replaceChild(newEl, oldEl);<br />
used to restore variable references. */ return newEl; };<br />
</code><code></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：veeLove.cn &#187; 优化 innerHTML 性能</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-2871</link>
		<dc:creator>veeLove.cn &#187; 优化 innerHTML 性能</dc:creator>
		<pubDate>Fri, 27 Feb 2009 15:58:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-2871</guid>
		<description>[...] 在怿飞看到这方面介绍，对于非ie的浏览器有效 ?View Code JAVASCRIPTfunction replaceHtml&#40;el, html&#41; &#123; var oldEl = typeof el === &quot;string&quot; ? document.getElementById&#40;el&#41; : el; /*@cc_on // Pure innerHTML is slightly faster in IE oldEl.innerHTML = html; return oldEl; @*/ var newEl = oldEl.cloneNode&#40;false&#41;; newEl.innerHTML = html; oldEl.parentNode.replaceChild&#40;newEl, oldEl&#41;; /* Since we just removed the old element from the DOM, return a reference to the new element, which can be used to restore variable references. */ return newEl; &#125;; el = replaceHtml&#40;el, newHtml&#41; /*instead of el.innerHTML = newHtml.*/ [...]</description>
		<content:encoded><![CDATA[<p>[...] 在怿飞看到这方面介绍，对于非ie的浏览器有效 ?View Code JAVASCRIPTfunction replaceHtml&#40;el, html&#41; &#123; var oldEl = typeof el === &quot;string&quot; ? document.getElementById&#40;el&#41; : el; /*@cc_on // Pure innerHTML is slightly faster in IE oldEl.innerHTML = html; return oldEl; @*/ var newEl = oldEl.cloneNode&#40;false&#41;; newEl.innerHTML = html; oldEl.parentNode.replaceChild&#40;newEl, oldEl&#41;; /* Since we just removed the old element from the DOM, return a reference to the new element, which can be used to restore variable references. */ return newEl; &#125;; el = replaceHtml&#40;el, newHtml&#41; /*instead of el.innerHTML = newHtml.*/ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Ye&#39;s blog</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-2356</link>
		<dc:creator>Ye&#39;s blog</dc:creator>
		<pubDate>Thu, 25 Dec 2008 14:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-2356</guid>
		<description>&lt;strong&gt;éè¿ Dom æ¹æ³æé« innerHTML æ§è½ï¼æ......&lt;/strong&gt;


JavaScript代码
...</description>
		<content:encoded><![CDATA[<p><strong>éè¿ Dom æ¹æ³æé« innerHTML æ§è½ï¼æ&#8230;&#8230;</strong></p>
<p>JavaScript代码<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：无语</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-228</link>
		<dc:creator>无语</dc:creator>
		<pubDate>Tue, 01 Apr 2008 08:05:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-228</guid>
		<description>在Opera好象一也样.....</description>
		<content:encoded><![CDATA[<p>在Opera好象一也样&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：无语</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-226</link>
		<dc:creator>无语</dc:creator>
		<pubDate>Tue, 01 Apr 2008 08:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-226</guid>
		<description>真的会提速吗?
function replaceHtml(el, html) {
	var oldEl = document.getElementById(el);
	var newEl = oldEl.cloneNode(false);
	newEl.innerHTML = html;
	oldEl.parentNode.replaceChild(newEl, oldEl);
	return newEl;
}
function testInnerText(el,a){ 
document.getElementById(el).innerHTML = a; 
} 
a随便一段字符串或者掉标签的字符串,循环执行5000次,结果在FF反而慢了一半</description>
		<content:encoded><![CDATA[<p>真的会提速吗?<br />
function replaceHtml(el, html) {<br />
	var oldEl = document.getElementById(el);<br />
	var newEl = oldEl.cloneNode(false);<br />
	newEl.innerHTML = html;<br />
	oldEl.parentNode.replaceChild(newEl, oldEl);<br />
	return newEl;<br />
}<br />
function testInnerText(el,a){<br />
document.getElementById(el).innerHTML = a;<br />
}<br />
a随便一段字符串或者掉标签的字符串,循环执行5000次,结果在FF反而慢了一半</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：leeight的马甲</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-127</link>
		<dc:creator>leeight的马甲</dc:creator>
		<pubDate>Wed, 19 Mar 2008 12:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-127</guid>
		<description>@fcicq
这么写为什么会提速呢？
搞不清楚原理呢</description>
		<content:encoded><![CDATA[<p>@fcicq<br />
这么写为什么会提速呢？<br />
搞不清楚原理呢</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：Lunatic Sun</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-42</link>
		<dc:creator>Lunatic Sun</dc:creator>
		<pubDate>Wed, 05 Mar 2008 08:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-42</guid>
		<description>XMLHttpRequest的提速方法和addEvent的提速方法原理是一致的，说起来还真是无聊，大家竟然都没有想到这么简单的方法。</description>
		<content:encoded><![CDATA[<p>XMLHttpRequest的提速方法和addEvent的提速方法原理是一致的，说起来还真是无聊，大家竟然都没有想到这么简单的方法。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：fcicq</title>
		<link>http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/comment-page-1/#comment-40</link>
		<dc:creator>fcicq</dc:creator>
		<pubDate>Tue, 04 Mar 2008 12:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/2008/03/04/innerhtml_and_dom_methods/#comment-40</guid>
		<description>既然说到了加速, 再提两个偶以前用过的.
getXHR = function() { return new XMLHttpRequest; };
/*@cc_on _d=document;eval(&#039;var document=_d&#039;)@*/

顺便偷留两个链接... :D
http://www.fcicq.net/wp/?p=138
http://www.fcicq.net/wp/?p=579</description>
		<content:encoded><![CDATA[<p>既然说到了加速, 再提两个偶以前用过的.<br />
getXHR = function() { return new XMLHttpRequest; };<br />
/*@cc_on _d=document;eval(&#8216;var document=_d&#8217;)@*/</p>
<p>顺便偷留两个链接&#8230; <img src='http://www.planabc.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
<a href="http://www.fcicq.net/wp/?p=138" rel="nofollow">http://www.fcicq.net/wp/?p=138</a><br />
<a href="http://www.fcicq.net/wp/?p=579" rel="nofollow">http://www.fcicq.net/wp/?p=579</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
