js隐藏中间4位,变成‘*’号时间:2020-12-29 21:32:00 var tel = "15222622548"; var reg = /^(\d{3})\d{4}(\d{4})$/; tel = tel.replace(reg, "$1****$2"); console.log(tel);