dotdot-mask

1.2.2 • Public • Published

dotdot

This script masks an input field by adding a dot every three digits starting from the last integer and allowing only numbers to be typed in.

You can use it with both vanilla JavaScript and jQuery, although jQuery is NOT required. Simply pass your selector(s) like this:

var elems = document.getElementsByTagName('input')
Dotdot(elems);
 
// or...
var elems = $('#myElem');
Dotdot(elems);
 

Get it with npm:

npm i dotdot-mask

Look in the demo/ folder for an example or check this bin.

/dotdot-mask/

    Package Sidebar

    Install

    npm i dotdot-mask

    Weekly Downloads

    2

    Version

    1.2.2

    License

    MIT

    Last publish

    Collaborators

    • aurelio