JS隐藏11位手机号码中间4位为**** 其实是用字符串的截取来实现,话不多说直接上代码: let tel = '15823561797'; tel = tel.slice(0,3)+" **** "+tel.slice(-4); console.log(tel); 效果如图: