There is no "Contains" in Javascript string
I used "Contains" method in C# whether the strings contains a keyword.
For example:
Code
string str = "string"; | |
if(str.Contains("str")) | |
{ | |
Console.Write("OK"); | |
} |
There is no such method, but you can "indexOf".
Code
var str = "string"; | |
if(str.indexOf("str")!= -1) | |
{ | |
alert("OK"); | |
} |
Tags: how to
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 60 feedbacks awaiting moderation...
Form is loading...