JS jQuery - check if value is in array

后端 未结 4 1279
野的像风
野的像风 2021-02-05 07:05

I am more of a PHP person, not JS - and I think my problem is more a syntax problem ..

I have a small jQuery to \"validate\" and check input value .

It works ok

4条回答
  •  囚心锁ツ
    2021-02-05 07:39

    As to your bonus question, try if (jQuery.inArray(jQuery("input:first").val(), ar) < 0)

提交回复
热议问题