hello,
i have a textbox in which i want take int from user in this format
000-000-0000
so as user type in int values its automatically become in this format
please advice
Hi nauna,
Check the below example.
HTML
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.3.4/inputmask/inputmask.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.3.4/inputmask/inputmask.extensions.min.js"></script> <script type="text/javascript"> $(function () { var inputmask = new Inputmask("###-###-####"); inputmask.mask($('[id*=txtData]')); }); </script> <input id="txtData" name="txtData" type="text" maxlength="12" />
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.