let str1 = "手机号";
let reg = /^(\d{3})\d*(\d{4})$/;
this.contactphone = str1.replace(reg,'$1****$2');
js手机号中间几位用*代替
最新推荐文章于 2023-02-08 02:26:38 发布
let str1 = "手机号";
let reg = /^(\d{3})\d*(\d{4})$/;
this.contactphone = str1.replace(reg,'$1****$2');