Verify whether the data val.value
// To replace the filter criteria var REG = new new the RegExp (val.value, " G " ); // character after replacement valslist = valslist.replace (REG, '' ); // to replace the filter criteria var REG = new new the RegExp ( " ,, " , " G " ); valslist = valslist.replace (REG, ' , ' );
// find inArray specified value in the array, the index value and returns it (if not found, it returns - 1)
// splice method to add to / from the array / delete items, then return items are deleted. data1: Location data2: Number data3: add a new item
vals.splice ($ inArray (val, vals ), 1.);