查找字符串的位置 indexOf() 返回某个字符串在字符串首次出现的位置,没有返回-1 indexOf(a,b)中参数a是字符串;b是开始查找的位置 var short = "ab"; var long = "aabccccaab"; var mix = "cdef"; long.indexOf