Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
46
rated 0 times [  49] [ 3]  / answers: 1 / hits: 38472  / 13 Years ago, wed, august 10, 2011, 12:00:00

Is there a function in jQuery or JavaScript that does the same as strstr() in PHP?



I have an AJAX response that should be 1,2,3,12,13,23 or 123. I want to check if 1 exists, then if 2 exists then if 3 exists.


More From » jquery

 Answers
16

Ok I just found something that works!



http://my-sliit.blogspot.com/2008/06/search-string-javascript-like-strstr-in.html



Thanks for your contributions :)


[#90693] Tuesday, August 9, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gideonb

Total Points: 187
Total Questions: 101
Total Answers: 86

Location: North Korea
Member since Mon, Feb 27, 2023
1 Year ago
;