📅  最后修改于: 2022-03-11 15:04:16.758000             🧑  作者: Mango
const button = document.querySelector(".button");
button.addEventListener("click", function (evt) {
// the event Target variable will contain the button element that we clicked on
const eventTarget = evt.target;
eventTarget.setAttribute("disabled", true);
});