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

news/2024/7/11 1:43:39 标签: jQuery, J#
ExpandedBlockStart.gif 代码
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />--> 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 验证文本框数字事件|有效|快捷 给控件绑定清楚非数字事件


http://www.niftyadmin.cn/n/1127649.html

相关文章

模仿 ios 分段单选

http://blog.csdn.net/qduningning/article/details/37935227 res/drawable/seg_left.xml <?xml version"1.0" encoding"utf-8"?> <selector xmlns:android"http://schemas.android.com/apk/res/android" > <item android:s…

js删除数组中重复的元素

1、方法一 将数组逐个搬到另一个数组中&#xff0c;当遇到重复元素时&#xff0c;不移动&#xff0c;若元素不重复则移动到新数组中 1 function unique(arr){2 var len arr.length;3 var result []4 for(var i0;i<len;i){5 var flag …

flash右键菜单

my_cm new ContextMenu();// 申明一个新的菜单对象 my_cm.hideBuiltInItems();// 屏敞当前的右键菜单 my_cm.customItems.push(new ContextMenuItem("思伟设计", menu1));// 创建一个新的子菜单&#xff0c;名为“技术支持&#xff0d;思伟设计”&#xff0c;并设置…

.net 获取checkBoxList 选中的值|radiobuttonlist|dropdownlist

.net 获取checkBoxList 选中的值 public string GetCheckBoxListValues(ListControl lc) { string tempValues ""; foreach (ListItem li in lc.Items) { if (li.Selected) tempValues…

[转]自定义Spinner五步走

本文转自&#xff1a;http://shazhuzhu1.iteye.com/blog/958806 在Android的UI开发中&#xff0c;Spinner(下拉列表)总是可以用到的&#xff0c;一个简单的自定义Spinner制作我们只需要记住这重要的五步&#xff0c;一个Spinner就可以应用而生了。 (1)新建一个Android工程&…

移动端流体布局

看李焱恢转载于:https://www.cnblogs.com/zuopin/p/5912958.html

React参数操作

2019独角兽企业重金招聘Python工程师标准>>> 1. 不要显式操作任何Component的props: var component <Component /> component.props.arg 0; //bad 2. var props {}; props.arg 0; var component <Component {...props} other{other prop}/> 转载…