<html>
<body>
<p>单击该按钮以创建带有一些文本的 SUB 元素。</p>
<button onclick="myFunction()">试一试</button>
<script>
function myFunction() {
var x = document.createElement("SUB");
var t = document.createTextNode("This text contains subscript text");
x.appendChild(t);
document.body.appendChild(x);
}
</script>
</body>
</html>