<?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>评论：如何将函数的实际参数转换成数组</title>
	<atom:link href="http://www.planabc.net/2010/01/06/arguments_to_array/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.planabc.net/2010/01/06/arguments_to_array/</link>
	<description>落草为根—专注前端技术&#38;&#38;关注用户体验</description>
	<lastBuildDate>Fri, 30 Jul 2010 03:14:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：makediff</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-7095</link>
		<dc:creator>makediff</dc:creator>
		<pubDate>Fri, 02 Apr 2010 07:07:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-7095</guid>
		<description>Array.prototype.slice.call(arguments, 0); Prototype里面也是这样写的</description>
		<content:encoded><![CDATA[<p>Array.prototype.slice.call(arguments, 0); Prototype里面也是这样写的</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：erik168</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-6729</link>
		<dc:creator>erik168</dc:creator>
		<pubDate>Thu, 11 Mar 2010 14:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-6729</guid>
		<description>var Array = 1;
-_-#</description>
		<content:encoded><![CDATA[<p>var Array = 1;<br />
-_-#</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：dreamer</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-6454</link>
		<dc:creator>dreamer</dc:creator>
		<pubDate>Wed, 10 Feb 2010 17:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-6454</guid>
		<description>arguments转换成数组，这样也可以：
var a = [];
a.push.apply(a, arguments);
//唯一[可能]的缺点是，需要定义一个变量</description>
		<content:encoded><![CDATA[<p>arguments转换成数组，这样也可以：<br />
var a = [];<br />
a.push.apply(a, arguments);<br />
//唯一[可能]的缺点是，需要定义一个变量</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：怿飞</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-6231</link>
		<dc:creator>怿飞</dc:creator>
		<pubDate>Sun, 31 Jan 2010 13:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-6231</guid>
		<description>@闲耘 谢谢，原文的确有不准确地方，已经修正，测试地址：http://www.planabc.net/demo/toarray/arguments.html</description>
		<content:encoded><![CDATA[<p>@闲耘 谢谢，原文的确有不准确地方，已经修正，测试地址：http://www.planabc.net/demo/toarray/arguments.html</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：kangre</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-6223</link>
		<dc:creator>kangre</dc:creator>
		<pubDate>Sun, 31 Jan 2010 02:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-6223</guid>
		<description>要慢慢学了！</description>
		<content:encoded><![CDATA[<p>要慢慢学了！</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：壁纸在线</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-6190</link>
		<dc:creator>壁纸在线</dc:creator>
		<pubDate>Wed, 27 Jan 2010 08:40:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-6190</guid>
		<description>看不太明白
平时用开JQUERY</description>
		<content:encoded><![CDATA[<p>看不太明白<br />
平时用开JQUERY</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：天光土木在线</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-6145</link>
		<dc:creator>天光土木在线</dc:creator>
		<pubDate>Thu, 21 Jan 2010 06:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-6145</guid>
		<description>有点难度哦！</description>
		<content:encoded><![CDATA[<p>有点难度哦！</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：闲耘™</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5959</link>
		<dc:creator>闲耘™</dc:creator>
		<pubDate>Tue, 12 Jan 2010 05:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5959</guid>
		<description>是否真的需要转成Array，我觉得在实际应用中需要停下来想一想。
如果只需要临时改变arguments这个参数列表（例如增加两个参数），而不改变arguments本身的类型和特性，可以直接如下调用（少了转换成数组的过程，可能会更快[未测试]，虽然这个性能的提升也未必有什么关键意义）：
!function(){
    Array.prototype.push.call(arguments, 4,5);
    document.write(arguments.length+&quot;&quot;);
    document.write((arguments instanceof Array)+&quot;&quot;);
    document.write(Array.prototype.join.call(arguments, &quot;,&quot;));
}(0,1,2,3);</description>
		<content:encoded><![CDATA[<p>是否真的需要转成Array，我觉得在实际应用中需要停下来想一想。<br />
如果只需要临时改变arguments这个参数列表（例如增加两个参数），而不改变arguments本身的类型和特性，可以直接如下调用（少了转换成数组的过程，可能会更快[未测试]，虽然这个性能的提升也未必有什么关键意义）：<br />
!function(){<br />
    Array.prototype.push.call(arguments, 4,5);<br />
    document.write(arguments.length+&#8221;");<br />
    document.write((arguments instanceof Array)+&#8221;");<br />
    document.write(Array.prototype.join.call(arguments, &#8220;,&#8221;));<br />
}(0,1,2,3);</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：怿飞</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5957</link>
		<dc:creator>怿飞</dc:creator>
		<pubDate>Tue, 12 Jan 2010 02:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5957</guid>
		<description>@nttdocomo 当你需要 arguments 使用 Array 的一些方法时，比如：push、shift、pop等时，那就需要将 arguments 转换成数组了。</description>
		<content:encoded><![CDATA[<p>@nttdocomo 当你需要 arguments 使用 Array 的一些方法时，比如：push、shift、pop等时，那就需要将 arguments 转换成数组了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：nttdocomo</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5914</link>
		<dc:creator>nttdocomo</dc:creator>
		<pubDate>Sun, 10 Jan 2010 02:31:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5914</guid>
		<description>还有我想问，将这些对象转换为数组有什么实际的使用例子。为什么要这样做？arguments不是也可以用for循环来拿里面的元素吗？为什么要转换为数组呢？</description>
		<content:encoded><![CDATA[<p>还有我想问，将这些对象转换为数组有什么实际的使用例子。为什么要这样做？arguments不是也可以用for循环来拿里面的元素吗？为什么要转换为数组呢？</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：nttdocomo</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5913</link>
		<dc:creator>nttdocomo</dc:creator>
		<pubDate>Sun, 10 Jan 2010 02:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5913</guid>
		<description>楼上的可以看看怿飞的window.name和jsonp！</description>
		<content:encoded><![CDATA[<p>楼上的可以看看怿飞的window.name和jsonp！</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：传说中的勇哥</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5893</link>
		<dc:creator>传说中的勇哥</dc:creator>
		<pubDate>Fri, 08 Jan 2010 13:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5893</guid>
		<description>各位谁真正处理过javascript跨域的问题,我就是想给别人作的页面的文本框赋值,通过我的页面,那位高手帮忙!</description>
		<content:encoded><![CDATA[<p>各位谁真正处理过javascript跨域的问题,我就是想给别人作的页面的文本框赋值,通过我的页面,那位高手帮忙!</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：闲耘™</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5889</link>
		<dc:creator>闲耘™</dc:creator>
		<pubDate>Fri, 08 Jan 2010 02:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5889</guid>
		<description>网站目前出问题了，可以直接看这个：
http://hotoo.googlecode.com/svn/trunk/test/toArray.html

另外关于nodelist to array:
http://hotoo.googlecode.com/svn/trunk/test/nodeList2Array.html
http://hotoo.googlecode.com/svn/trunk/test/nodeList2Array2.html</description>
		<content:encoded><![CDATA[<p>网站目前出问题了，可以直接看这个：<br />
<a href="http://hotoo.googlecode.com/svn/trunk/test/toArray.html" rel="nofollow">http://hotoo.googlecode.com/svn/trunk/test/toArray.html</a></p>
<p>另外关于nodelist to array:<br />
<a href="http://hotoo.googlecode.com/svn/trunk/test/nodeList2Array.html" rel="nofollow">http://hotoo.googlecode.com/svn/trunk/test/nodeList2Array.html</a><br />
<a href="http://hotoo.googlecode.com/svn/trunk/test/nodeList2Array2.html" rel="nofollow">http://hotoo.googlecode.com/svn/trunk/test/nodeList2Array2.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：闲耘™</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5887</link>
		<dc:creator>闲耘™</dc:creator>
		<pubDate>Thu, 07 Jan 2010 15:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5887</guid>
		<description>不知道您是怎样测试的，我得到的结论是这两种方法其实效率相当。
http://blog.xianyun.org/2010/01/07/performance-of-arguments-to-array.html</description>
		<content:encoded><![CDATA[<p>不知道您是怎样测试的，我得到的结论是这两种方法其实效率相当。<br />
<a href="http://blog.xianyun.org/2010/01/07/performance-of-arguments-to-array.html" rel="nofollow">http://blog.xianyun.org/2010/01/07/performance-of-arguments-to-array.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：cc</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5881</link>
		<dc:creator>cc</dc:creator>
		<pubDate>Thu, 07 Jan 2010 06:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5881</guid>
		<description>ie 的 NodeList不能用slice 方法
貌似只能用原始的方法</description>
		<content:encoded><![CDATA[<p>ie 的 NodeList不能用slice 方法<br />
貌似只能用原始的方法</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：怿飞</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5880</link>
		<dc:creator>怿飞</dc:creator>
		<pubDate>Thu, 07 Jan 2010 04:34:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5880</guid>
		<description>@dongyuwei 其实Array的很多方法都可以这样使用的，呵呵</description>
		<content:encoded><![CDATA[<p>@dongyuwei 其实Array的很多方法都可以这样使用的，呵呵</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：怿飞</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5879</link>
		<dc:creator>怿飞</dc:creator>
		<pubDate>Thu, 07 Jan 2010 04:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5879</guid>
		<description>@dongyuwei 谢谢，分类模板调整过了，更新后原来的一个插件失效了。</description>
		<content:encoded><![CDATA[<p>@dongyuwei 谢谢，分类模板调整过了，更新后原来的一个插件失效了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：simaopig</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5877</link>
		<dc:creator>simaopig</dc:creator>
		<pubDate>Thu, 07 Jan 2010 03:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5877</guid>
		<description>貌似jQuery有makeArray的实现方式。。</description>
		<content:encoded><![CDATA[<p>貌似jQuery有makeArray的实现方式。。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：dongyuwei</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5876</link>
		<dc:creator>dongyuwei</dc:creator>
		<pubDate>Thu, 07 Jan 2010 02:58:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5876</guid>
		<description>分类“前端常用工具”所有日志

Fatal error: Call to undefined function: st_tag_cloud() in /nfs/c02/h09/mnt/28795/domains/planabc.net/html/wp-content/themes/mind/archive.php on line 29

这个链接访问不了了？</description>
		<content:encoded><![CDATA[<p>分类“前端常用工具”所有日志</p>
<p>Fatal error: Call to undefined function: st_tag_cloud() in /nfs/c02/h09/mnt/28795/domains/planabc.net/html/wp-content/themes/mind/archive.php on line 29</p>
<p>这个链接访问不了了？</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：dongyuwei</title>
		<link>http://www.planabc.net/2010/01/06/arguments_to_array/comment-page-1/#comment-5875</link>
		<dc:creator>dongyuwei</dc:creator>
		<pubDate>Thu, 07 Jan 2010 02:57:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.planabc.net/?p=354#comment-5875</guid>
		<description>除了slice切片方法，splice拼接方法也是可以的。
function test(a,b,c){
    console.log([].splice.call(arguments,0);
)};
test(1,2,3);//[1,2,3]</description>
		<content:encoded><![CDATA[<p>除了slice切片方法，splice拼接方法也是可以的。<br />
function test(a,b,c){<br />
    console.log([].splice.call(arguments,0);<br />
)};<br />
test(1,2,3);//[1,2,3]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
