HI WELCOME TO SIRIS

check whether a string contains another string or not in jquery?

Leave a Comment
var str1 = "ABCDEFGHIJKLMNOP";
var str2 = "DEFG";
if(str1.indexOf(str2) != -1){
    console.log(str2 + " found");
}

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.