String.prototype.contains = function (it) { return this.indexOf(it) != -1; };
Just add this to javascript and u would be ablto use the systax like below
var str = "Hello world this is a test";
if(var.contains("world"))
{
alert("It contains world");
}
|