Web Design

Only members of this group can post notes and use other group resources. Join now to get access to all group resources!
Log in or register to join this group

Client Side Scripting substring in JavaScript  Viewed 9846 time(s), 2 post(s)., 1/5/2014 3:32:10 AM - by Sarah

Sarah
Sarah 1/5/2014 3:32:10 AM

How can I check a string contains another substring in Javascript?

This content has not been rated yet. 
106 Reputation 7 Total posts
1
Sam
Sam 1/5/2014 6:04:48 PM

You may use indexOf() --- Javascript is case sensitive

It returns the position of the substring in the string. If not found, it will return -1


This content has not been rated yet. 
233 Reputation 37 Total posts
2