<div class="row">
<div class="col-md-6 offset-md-3">
<input type="text" class="form-control"
placeholder="Amount in INR"
name="amount" id="amount"
autocomplete="off" required ">
</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