js数组删除元素

Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
return this;
};

groupRoomId.remove($("#input_roomid").val());
 
原文地址:https://www.cnblogs.com/gaofangquan/p/10384739.html