var arr = [1, 2, 3, 4, 5]; var removeItem = 2; arr = $.grep(arr, function(value) { return value != removeItem; });
jquery 删除数组指定元素
最新推荐文章于 2024-09-09 13:29:10 发布
var arr = [1, 2, 3, 4, 5]; var removeItem = 2; arr = $.grep(arr, function(value) { return value != removeItem; });