摘要: 我们知道,Array.prototype.slice.call(arguments)能将具有length属性的对象转成数组,除了IE下的节点集合(因为ie下的dom对象是以com对象的形式实现的,js对象与com对象不能进行转换)如:var a={length:2,0:'first',1:'second'};Array.prototype.slice.call(a);// ["first", "second"]var a={length:2};Array.prototype.slice.call(a);// [undefi 阅读全文
posted @ 2012-08-01 09:25 oneroundseven 阅读(329) 评论(1) 推荐(1) 编辑