var a=[[5,6,7],[15,16,8,7],[3,23,44,55,66]]; var max=a[0].length; for (var i = 1; i < a.length; i++) { if (max<a[i].length) { max=a[i].length; var b=i; } } alert(b); alert(a[b]);
时间: 2024-11-08 09:13:01
var a=[[5,6,7],[15,16,8,7],[3,23,44,55,66]]; var max=a[0].length; for (var i = 1; i < a.length; i++) { if (max<a[i].length) { max=a[i].length; var b=i; } } alert(b); alert(a[b]);