function convertArray(nodeList){
var arr = []
if(Array.prototype.slice){
arr = [].slice.call(nodeList);
}else{
for(var i=0,len = nodeList.length;i<len;i++){
arr.push(nodeList[i]);
}
}
return arr;
}
时间: 2024-10-18 19:53:22