<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body>

<script>
var patt1=new RegExp("^[1-9][0-9]*$");
document.write(patt1.test("1000"));
</script>

</body>
</html>

匹配非零整数,成功返回true,失败返回false。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2021-12-03
  • 2021-08-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-09-18
  • 2022-01-24
相关资源
相似解决方案