Nicker

Nicker

  • NA
  • 5
  • 3.2k

How to check if string contains certain word in JScript

May 24 2016 5:58 AM
y Code
 
var x = document.getElementById("searchbox").value;
if (x.contains('jo')){
 
 
When I run the code I got this error 
Error: Object doesn't support property or method 'contains'
 
apparently I cant use contains, is there other method for it? 
 

Answers (2)