Input Allow Only Number In Jquery



Hello Dev,

Immediately, i we are going to present you enter permit solely quantity in jquery. This text will provide you with easy instance of enter permit solely quantity in jquery. you’ll enter permit solely quantity in jquery. So let’s observe few step to create instance of enter permit solely quantity in jquery.

Instance:


<!DOCTYPE html>
<html>
<head>
    <title>Enter Permit Solely Quantity In Jquery</title>
    <script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<physique>
  
<div class="container">
    <h1>Enter Permit Solely Quantity In Jquery</h1>
    <enter kind="textual content" identify="quantity" class="quantity" autocomplete="off">
</div>
</physique>
<script kind="textual content/javascript">
    $('.quantity').keypress(operate(occasion) {
      if ((occasion.which != 46 || $(this).val().indexOf('.') != -1) && (occasion.which < 48 || occasion.which > 57)) {
        occasion.preventDefault();
      }
    });
</script>
</html>

I hope it is going to help you…



Komentar

Postingan populer dari blog ini

PHP 8 Multiple Select Dropdown Example

Laravel 8 Get HTTP Hostname

JQuery Drag And Drop Menu Example