function regEmail(email) {
if(String(email).indexOf(’@’) > 0) {
const str = email.split(’@’)
let _s = ‘’
if(str[0].length > 3) {
for(var i = 0; i < str[0].length - 3; i++) {
_s += ‘*’
}
}
var new_email = str[0].substr(0, 3) + _s + ‘@’ + str[1]
}
return new_email
}
替换邮箱字符
最新推荐文章于 2021-09-08 15:49:01 发布