jQuery: Check if special characters exists in string

后端 未结 4 896
心在旅途
心在旅途 2020-12-02 10:09

I know this question is asked more often here on Stack, but I can\'t seem to get a straight answer out of the questions already posted.

I need to check if all specia

4条回答
  •  孤城傲影
    2020-12-02 10:43

    You are checking whether the string contains all illegal characters. Change the ||s to &&s.

提交回复
热议问题