Monday, July 6, 2020

Price or Amount validation by jQuery is very easy


      <div class="row">
        <div class="col-md-6 offset-md-3">
          <input type="textclass="form-control"
  placeholder="Amount in INR
name="amountid="amount
autocomplete="offrequired ">
          
        </div>
      </div>

<script>

$('#amount').keypress(function(event) { if ((event.which != 46 ||
$(this).val().indexOf('.') != -1) &&
(event.which < 48 || event.which > 57)) { event.preventDefault(); } });

</script>



No comments:

Post a Comment

Front-End Custom Development

  Front-End Custom Development Our front-end functional components are tailor-made, crafted from the ground up to provide not only exception...

Clock