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

colourful pyramid using PHP

  <! DOCTYPE html > < html lang = "en" > < head >   < title >Colorfull Pyramid</ title >   < me...

Clock