js用星号隐藏电话中间四位号码


$(document).ready(function(){
    var mobile="{$user.mobile}";
    var reg=/^(d{3})d{4}(d{4})$/;
    mobile = mobile.replace(reg, "$1****$2");
    $("#mymobile").text(mobile);


});


 
原文地址:https://www.cnblogs.com/raphael1982/p/8184285.html