var tel = 15617076160;
tel = "" + tel;
var newTel = tel.substr(0,3) + "****" + tel.substr(7)
console.log(newTel);//156****6160
js手机号中间部分隐藏****,显示前三位和后四位
最新推荐文章于 2022-08-23 14:57:57 发布
var tel = 15617076160;
tel = "" + tel;
var newTel = tel.substr(0,3) + "****" + tel.substr(7)
console.log(newTel);//156****6160