zoukankan      html  css  js  c++  java
  • jquery 验证文本框数字事件|有效|快捷 给控件绑定清楚非数字事件

    代码
    var checkNumControls = new Array("TbZipCode","TbPhone1","TbPhone2","TbPhone3","TbSeeDoctorAgeYear","TbSeeDoctorAgeMonth",
    "TbFatherBearAge","TbMatherBearAge","TbAnnualIncome","TbGravidityNum","TbAbortionNum","TbAge","TbBornWeight","TbWeight","TbHeight",
    "TbVisitWeight","TbVisitHeight","TbVisitBodySurfaceArea","TbVisitAge","TbDefectSize","TbShuntingConditionNo1","TbShuntingConditionNo2","TbEF","TbOcclusionAge",
    "TbOperationAge","TbCost","TbCost1");
    for(var j=0;j<checkNumControls.length;j++)
    $(
    "#"+checkNumControls[j]).keyup(function(){$(this).val($(this).val().replace(/[^\d\.-]+/,""));});

    jquery 验证文本框数字事件|有效|快捷 给控件绑定清楚非数字事件

  • 相关阅读:
    Pytest学习之 autouse=True,自动调用fixture功能
    Pytest学习之xfail使用
    Pytest学习之use fixtures
    python
    python
    python
    python
    python
    python
    python
  • 原文地址:https://www.cnblogs.com/bestsaler/p/1835460.html
Copyright © 2011-2022 走看看