js记录数组如何查找
var arr_mate = new Array();arr_mate = {
code:"1001",
name:"ABC"
}
arr_mate = {
code:"1002",
name:"DEF"
}
arr_mate = {
code:"1003",
name:"ddd"
}
................
那么怎么实现,根据指定的 code 得到 name值;
比如写一个函数,实现: arr_mate.get_name("1001") ="ABC";
页:
[1]