05 2012 档案

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