Allow Only Numbers in Textbox


Allow only numbers in textbox
function allowOnlyNumbers(elementid){
  $("#" + elementid).getControl().keypress( function() {
    $(this).val($(this).val().replace(/[^\d].+/, ""));
        if ((event.which < 48 || event.which > 57)) {
          event.preventDefault();
        }
 
  }); 
}