//银行卡号4位添加空格 function bankVal() { $('#bankVal').on('blur',function () { this.value = this.value.replace(/\s/g, '').replace(/(\d{4})(?=\d)/g, "$1 "); }) }
转载于:https://www.cnblogs.com/q460021417/p/6020474.html
//银行卡号4位添加空格 function bankVal() { $('#bankVal').on('blur',function () { this.value = this.value.replace(/\s/g, '').replace(/(\d{4})(?=\d)/g, "$1 "); }) }
转载于:https://www.cnblogs.com/q460021417/p/6020474.html