QW-lzm
<head>
  <script type="text/javascript">
    function checkthis()
    {
      var t=document.forms[0].elements[0];
      var reg=/^\d+[.]?\d{1,3}$/;
      alert(reg.test(t.value));
    }
  </script>
</head>
<body>
  <form>
    <input type="text" id="txt" />
    <input type="button" value="检查" onclick="checkthis();" />
  </form>
</body>

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
相关资源
相似解决方案