js中如何取得数组中相同元素的下标function searchKeys(needle, haystack){ var result = [] for (i in haystack){if (haystack[i] == needle){ result.p2023-04-30JavaScript990