如何在html或javascript中验证密码? 由 哀月天发布于 2020-05-09 09:50:24 我不知道如何编写代码以在这些条件下验证密码 (仅以大写字母开头,仅8个字符,不少于一个,具有至少一个数字和特殊字符)使用html或javascript条件
You can use the html input
pattern
attribute. The pattern attribute's value is aregex
, which tests strings. I made a regex for your particular case.试试这个