indexOf returns the position of the string in the other string. If not found, it will return -1:
indexOf
-1
var s ="foo"; alert(s.indexOf("oo")>-1);