动态写入
innerHTML
<body>
<div id="area"></div>
</body>
<script>
const html = "<strong>这是一个测试标签</strong>";
document.getElementById("area").innerHTML = html;
</script>
<body>
<div id="area"></div>
</body>
<script>
const html = "<strong>这是一个测试标签</strong>";
document.getElementById("area").innerHTML = html;
</script>