标签:style blog color os io java ar div cti
过滤
var List = sizes.filter(function (size) {
return size.id == 12;
});
sizes = [
{id : 10,,stock:130},{id : 11,stock:120},{id : 12,stock:100}
]
filter是new一个新的array,然后给他过滤后的对象,最后var list 起来
标签:style blog color os io java ar div cti
原文地址:http://www.cnblogs.com/stooges/p/3963537.html