主页
JavaScript
JavaScript 字符串搜索
tryjs_string_indexof_1
运行 ❯
×
更改方向
保存代码
更改主题
JavaScript 字符串方法
如果找不到文本,indexOf() 和 lastIndexOf() 都会返回 -1: