js手机号码带*号处理

 

var tells = '手机号码'
var tell = /(\d{3})\d*(\d{4})/;
phone = tells.replace(tell, '$1****$2')
console.log(phone);

猜你喜欢

转载自blog.csdn.net/weixin_43101671/article/details/114119267
今日推荐