Ok just add this line and ur String will hava String.contains functionality which will return
if a string exist in a
String.prototype.contains = function (it) { return this.indexOf(it) != -1; };
eg.
if ((taga[i]).innerHTML.toString().contains(".jp")) {
alert("hello world this is a test");
}
note with this type of coding we are extending the functionality of the existing String class or prototype.
|