为什么运行出来那么多逗号啊啊啊啊~~~~
var scoreStr = "小明:87;小花:81;小红:97;小天:76;小张:74;小小:94;小西:90;小伍:76;小迪:64;小曼:76";
var num = scoreStr.split(';');
for(i=0;i<num.length;i++){
num2 = new Array();
num2[i] =parseInt(num[i].slice(3,5),10);
document.write(num2);
};
运行结果:87,81,,97,,,76,,,,74,,,,,94,,,,,,90,,,,,,,76,,,,,,,,64,,,,,,,,,76