|
1 2 3 4 |
<input onblur="this.value = this.value.replace(/[^\d]/g, '').replace(/\B(?=(?:\d{3})+(?!\d))/g, ' ')" onfocus="this.value = this.value.replace(/\s/g, '')" /> |
|
1 2 3 4 |
<input onblur="this.value = this.value.replace(/[^\d]/g, '').replace(/\B(?=(?:\d{3})+(?!\d))/g, ' ')" onfocus="this.value = this.value.replace(/\s/g, '')" /> |