lal520

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h2> Javascript </h2>
<!--
<script>
var str = \'adcdefg\';//用户名
var reg = /^[a-zA-Z\d]\w{3,11}[a-zA-Z\d]$/;//正则
if(reg.test(str)){
alert(\'验证成功\');
}else{
alert(\'验证失败\');
}
</script>
-->
<script>
var uPattern = /^[a-zA-Z0-9_-]{4,16}$/;
//输出 true
console.log(uPattern.test("lAl520_-"));
</script>
</body>
</html>

分类:

技术点:

相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-10-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-01-09
  • 2021-12-31
相关资源
相似解决方案