Source Code:
(back to article)
Submit
Result:
Report an issue
<button id="clickButton">Click Me</button> <script> document.getElementById("clickButton").addEventListener("click", function () { alert("Button was clicked!"); }); </script>