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

Hello world! Rookie question

Is there any way to make that <a> </a> gets linked to a variable or by a function in js?

29th May 2018, 1:07 PM
Leandro Nicolás López Hegui
Leandro Nicolás López Hegui - avatar
1 Réponse
+ 2
I think you mean Event Listeners. <a onclick="func()" href="#"> Click Here</a> <script> function func(){ alert("hello"); } </script>
29th May 2018, 1:19 PM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar