functi
on
formatPh
(phon
eon
e) {return
phon
e.replace
(/(\d{3})\d{4}(\d{4})/
,"
$
1****$
2"
); } 姓名显示最后一个字,其余用星号代替
‘实打实的
‘.
(/.(?=.)/g,replace
‘*
‘
);
return
new
Array(str.length
).join
(‘*
‘
)str.
+
substr
(-1
);
时间: 2024-10-08 15:24:11