How to user mask for Phone/Zip Code or Other in Jquery?

By Adil Shahbaz   Posted on April-12-2018   436

Step 1:

<input name="phone" id="phone" type="text" required>

Step 2:

Add CDN

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.js"></script>

 

Step 3:

    <script>
        jQuery(function ($) {
            $("#phone").mask("9999-9999999");
        });
    </script>

Quotation by Hurbert hoover
By Adil Shahbaz    12-Apr-2018 Views  436



You may also read following recent articles

How to Use Bootstrap Buttons in HTML