<html>
<body>
<p>单击该按钮以创建带有一些文本的 DD 元素。</p>
<button onclick="myFunction()">试一试</button><br><br>
<dl id="myDL">
<dt>Coffee</dt>
</dl>
<script>
function myFunction() {
var x = document.createElement("DD");
var t = document.createTextNode("Black hot drink");
x.appendChild(t);
var y = document.getElementById("myDL");
y.appendChild(x);
}
</script>
</body>
</html>