Javascript – How to stop a button from being clicked again when I press the enter key after clicking it
<body> <button id="aButton">A button</button> <script> document.querySelector("#aButton").addEventListener("click", () => { console.log("Button clicked!"); }) </script> </body> I have a simple button that logs "Button clicked!" to the console when it is clicked. If I click that button and then press the enter…