JS中indexOf()方法的使用

Array.indexOf()方法返回在数组中可以找到一个给定元素的第一个索引,如果不存在,则返回-1。语法:arr.indexOf(searchElement[,fromIndex]);String.inde...