.indexOf is not a function 铁骨铮铮XSS 2020-06-12 387 阅读1分钟 Basically indexOf() is a method belongs to string(array object also), But while calling the function you are passing a number, try to cast it to a string and pass it.