C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着
代码
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 验证文本框数字事件|有效|快捷 给控件绑定清楚非数字事件

posted on 2010-08-12 10:53  王德田  阅读(749)  评论(0编辑  收藏  举报