1//allow a number in textbox using jQuery.
2$('#valuepoints').keypress(function (e) {
3 var charCode = (e.which) ? e.which : event.keyCode;
4 if (String.fromCharCode(charCode).match(/[^0-9]/g))
5 return false;
6});
1//allow a number in textbox using jQuery.
2jQuery('.numbersOnly').keyup(function () {
3 this.value = this.value.replace(/[^0-9\.]/g,'');
4});