indexOf()方法可返回某个指定的字符串值在字符串中首次出现的位置。

①对大小写敏感

②如果要检索的字符串值没有出现,则该方法返回-1.

③位置时从0开始的

$j(this).html().indexOf()

补充:lastIndexOf(),substring(),charCodeAt()

  charCodeAt():返回指定位置的字符的Unicode编码

  charAt():返回指定位置的字符串

相关文章:

  • 2021-05-18
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-28
  • 2022-03-01
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案