定义一个map对象
var mapObject = { 001:‘xiaoming‘ , 002:‘小花‘};
依次获取map对象值
for(var key in mapObject) {
var value = mapObject[key];
alert(key);
alert(value);
}
【参考】:https://blog.csdn.net/liuss_ujn/article/details/75088097?utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link
js 获取 map 对象的 key和value
原文:https://www.cnblogs.com/wuzimeimei/p/15356141.html