标签:span 隐藏 mobile class bsp 电话号码 color 获取 pre
1、java
String mobile = "11122223333"; String substringStart = mobile.substring(0, 3); //获取前面三位数字 String substringEnd = mobile.substring(7,mobile.length()); String strMobile = substringStart+"****"+substringEnd; //获取后面四位数字
2、jquery
var str = "11122223333";
var tel = str.toString().substr(0, 3)+‘****‘+str.toString().substr(7); //str为所求结果
标签:span 隐藏 mobile class bsp 电话号码 color 获取 pre
原文地址:https://www.cnblogs.com/g-smile/p/9149536.html