js 如何判断输入的字符串中含有特殊字符。最好有例子啊可以用正则表达式判断.function illegalChar(str){var pattern=[`~!@#$%^&*()_+<>?:"{},.'[]]im if(pat2023-02-21JavaScript170