【发布时间】:2011-05-13 22:00:06
【问题描述】:
如何创建此 Java 代码的 JavaScript/JQuery 等效项:
Map map = new HashMap(); //Doesn't not have to be a hash map, any key/value map is fine
map.put(myKey1, myObj1);
map.put(myKey2, myObj2); //Repeat n times
function Object get(k) {
return map.get(k);
}
【问题讨论】:
标签: javascript jquery hashmap