<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mvc1</title>
<script type="text/javascript">
function fn(phone) {
phone = phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
return phone;
}
console.log('fn', fn('13122222222'));
</script>
</head>
<body>
</body>
</html>