<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="wrapper">
<strong>年会抽奖</strong>
<h1>获奖手机号码:<span class="phone">???</span></h1>
</div>
<script>
const tel = "13931933190"
//1 利用正则划分手机号码
const reg = /^(\d{3})(\d{4})(\d{4})$/
const a = tel.replace(reg, "$1****$2")
console.log(a);
document.querySelector(".phone").innerHTML = a
</script>
</body>
</html>