I have a textbox
where user can insert only numbers
. So I tried with below link
But still I am able to insert [.] (decimal) in the textbox. Below is what I tried
$(".allownumericwithoutdecimal").on("keypress keyup blur",function (event) {
$(this).val($(this).val().replace(/[^\d].+/, ""));
if ((event.which < 48 || event.which > 57)) {
event.preventDefault();
}
Textbox
<igtxt:WebNumericEdit ID="txtNoofPages" Width="24%" runat="server" CssClass="allownumericwithoutdecimal">
</igtxt:WebNumericEdit>