Buttons | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Buttons

How do you make it so that something happens when you press a button on the web code?

18th Jun 2018, 4:44 PM
caden
1 Réponse
+ 10
Using the 'onclick' attribute <button onclick="clicked()" > Text </button> Then you can use JS for your work ~ <script> function clicked (){ alert("Just a test!") } </script>
18th Jun 2018, 4:49 PM
Nikhil
Nikhil - avatar