Jquery.inputmask not working

你。 提交于 2019-12-05 12:40:15

Try to use this inputmask script,

<script type='text/javascript' src="https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.js"></script>

Working example JSFIDDLE

<!DOCTYPE html>
<html>
<head>
  <script type='text/javascript' src='http://code.jquery.com/jquery-1.11.0.js'></script>
  <script type='text/javascript' src="https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.js"></script>

<script type='text/javascript'>
//<![CDATA[ 
  $(window).load(function(){
    $("#currIN").inputmask("9999");
  });
//]]> 
</script>
</head>
<body>
  <td>
  <input value="10" id="currIN">
</td>
</body>
</html>

You can use this CDN-

https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.1.60/inputmask/jquery.inputmask.js

A working demo is given here for you-

$("#piash").inputmask("A-999");
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.1.60/inputmask/jquery.inputmask.js"></script>

<td>
  <input value="A-45" id="piash">
</td>

While this question is old I believe I have found a solution for those with a similar problem. The noConflict() function fixed it.

<script type='text/javascript'>

    $j=jQuery.noConflict();

    $j(document).ready(function () {

        $j("#currIN").inputmask("9999");

    });
</script>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!