indexOf( string, 要查找的字符串 int (可选)开始查找位置,不能大于被查找字符串长度 ) 返回值:找到>=0, 未找到-1 示例: var s ="abcdef"; s.indexOf("ab"); 返回:0