手机中间三位隐藏
var phone = $('#omitphone').text();
var mphone = phone.substr(0, 4) + '***' + phone.substr(7);
$('#omitphone').text(mphone);
银行卡后四位显示,后5-8位隐藏,其他前面剩余位数显示
var card = $('#omitcard').text();
var cardlength= card.length;
var mcard = card.substr(0, cardlength-8) + '****' + card.substr(cardlength-4);
$('#omitcard').text(mcard);
用户姓名后第二位隐藏(两位则最后一位隐藏,三位则中间隐藏)
var name = $('#omitname').text();
var namelength= name.length;
var mname = name.substr(0, 1) + '*' + name.substr(2);