indexOf的用法

A.indexOf(B)="-1"表示的是不存在

不等于-1就表示存在 

http://www.w3school.com.cn/jsref/jsref_indexOf.asp

没有出现就是-1,没有出现就是-1,没有出现就是-1

猜你喜欢

转载自www.cnblogs.com/antyhouse/p/9070678.html
今日推荐