New course! Every coder should learn Generative AI!
Try a free lesson+ 1
How do I attach alerts to my button
I need help attaching my buttons to my alerts
2 Answers
+ 11
<button onclick="alert('something');">Click</button>
+ 5
When you get to completing the Javascript lessons, your question is addressed in the last group [DOM & Events] section 6, Handling Events.