SHARE
TWEET

Untitled

a guest Aug 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.getElementById('inputId').addEventListener('input', function(evt) {
  2.   this.value = this.value
  3.             .replace(/\./g, '')
  4.             .replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.');
  5. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top