$(document).ready(function(){
var testList ={};
testList[0]="A0";
testList["q1"]="A1";
testList[2]="A2";
// delete testList[2];
var arr = [];
for(var x in testList){
alert("索引:"+x+",值:"+testList[x]);
arr.push(testList[x]);
}
alert("大小:"+arr.length);
for(var y=0;y<arr.length;y++){
alert(arr[y]);
}
});
var testList ={};
testList[0]="A0";
testList["q1"]="A1";
testList[2]="A2";
// delete testList[2];
var arr = [];
for(var x in testList){
alert("索引:"+x+",值:"+testList[x]);
arr.push(testList[x]);
}
alert("大小:"+arr.length);
for(var y=0;y<arr.length;y++){
alert(arr[y]);
}
});