Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js string insert space

document.getElementById('iban').addEventListener('input', function (e) {
  e.target.value = e.target.value.replace(/[^dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim();
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #string #insert #space
ADD COMMENT
Topic
Name
3+4 =