JavaScript DOM操作案例点击按钮禁用文本框

<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<input type="button" value="禁用文本框" />
<input type="text" value="我是文本框" />
<script>
    document.getElementById("bt").onclick = function () {
      document.getElementById("tex").disabled = "disabled";
    };
</script>
</body>
</html>