MooTools 哈希表

获取键值用:id

var products=new Hash();
products.include('1',{price:100,time:5});
products.include('2',{price:101,time:6});
products.include('3',{price:103,time:62});
alert(products.get('1').price);
products.each(function (data,id){
 alert(id);
});

原文地址:https://www.cnblogs.com/lv_yantao/p/1831650.html