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-12-28 10:34:18