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