Get started with imask CDN

MIT licensed

IMask: library for input masking, enhancing UX with real-time feedback and validation.

Tags:
  • javascript
  • jquery
  • input
  • mask

Stable version

Copied!

How to start using imask CDN


<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.cdnhub.io/imask/7.5.0/imask.min.js"></script>
  <style>
    #mask input { width: 100px; padding: 5px; margin: 10px; border: 1px solid #ccc; text-align: center; }
  </style>
</head>
<body>
  <div id="mask">
    <input type="text" mask="00/00/0000" placeholder="MM/DD/YYYY">
  </div>
  <script>
    const maskInput = document.querySelector('#mask input');
    MaskedInput.create(maskInput, {
      mask: '00/00/0000'
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!

All versions