📜  html代码示例中的禁用按钮

📅  最后修改于: 2022-03-11 14:53:19.828000             🧑  作者: Mango

代码示例5
let button = document.getElementById("btn");
button.setAttribute("disabled","true");
button.style.pointerEvents = "none";
button.style.opacity = 0.5;