如何从JavaScript对象中删除项目
可能重复:
如何从javascript对象中移除一个属性
我如何从JavaScript对象中删除项目?
喜欢这个:
var test = {'red':'#FF0000', 'blue':'#0000FF'};
test.remove('blue');
var test = {'red':'#FF0000', 'blue':'#0000FF'};
delete test.blue; // or use => delete test['blue'];
console.log(test);
链接地址: http://www.djcxy.com/p/4661.html