Pages
(Move to ...)
Home
Java
Android
Php
Cake PHP
jQuery
Grails
All Pages
▼
Friday, March 1, 2013
How to find if an array contains a specific string in JavaScript/jQuery?
var cat = [];
cat.push('1');
cat.push('2');
cat.push('3');
var
found
=
$
.
inArray
(
'1'
,
cat
)
>
-
1
;
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment