Code
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 verifies text box numeric events | valid | quickly binds clear non-numeric events to the control