js身份证掩饰成**(class循环处理)

$('.shijian').each(function (i){
value=$(this).attr('data');
value1=value.replace(/^(.{3})(?:d+)(.{4})$/,"$1***********$2");
$(this).html(value1);
});

原文地址:https://www.cnblogs.com/weiyiyong/p/7628084.html