Usually I would expect a String.contains() method, but there doesn't seem to be one.
String.contains()
What is a reasonable way to check for this?
转载于:https://stackoverflow.com/questions/1789945/how-to-check-whether-a-string-contains-a-substring-in-javascript