📜  单击后禁用按钮 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:17.981000             🧑  作者: Mango

代码示例1
You can add an onclick handler to your button:

document.getElementById("idOfButton").onclick = function() {
    //disable
    this.disabled = true;

    //do some validation stuff
}