To check if a string contains another string in JavaScript you can use the indexOf function
Sample JS
var sampleString = "This is a String"; if(s.indexOf("is") > -1){ //do something }
for more informations see w3schools JavaScript String indexOf() Method
RT @CodeSnippetsNET: http://t.co/xBpuF7NqoU #javascript