<input type="text" οnkeyup="this.value =this.value.replace(/\s/g,'').replace(/[^\d]/g,'').replace(/(\d{4})(?=\d)/g,'$1 ');">
JS输入银行卡号,4位自动加空格
最新推荐文章于 2022-10-14 15:33:40 发布
<input type="text" οnkeyup="this.value =this.value.replace(/\s/g,'').replace(/[^\d]/g,'').replace(/(\d{4})(?=\d)/g,'$1 ');">