Any way to make jQuery.inArray() case insensitive?

后端 未结 8 1661
轮回少年
轮回少年 2020-12-03 16:44

Title sums it up.

8条回答
  •  生来不讨喜
    2020-12-03 17:13

    No. You will have to fiddle with your data, I usually make all my strings lowercase for easy comparisons. There is also the possibility of using a custom comparison function which would do the necessary transforms to make the comparison case insensitive.

提交回复
热议问题