Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>....Eventos: Ejemplos 0 ....</title>
- </head>
- <body>
- <input type="button" id="b1" value="Boton 1"/>
- <input type="button" id="b2" value="Boton 2"/>
- <script>
- b1 = document.getElementById("b1");
- b1.addEventListener("click", () => {
- //Body de la funcion ... //Funcion sin nombre lambda
- console.log("Click en boton 1");
- });//
- b2 = document.getElementById("b2");
- b2.addEventListener("click", clickb2);
- function clickb2(){
- console.log("Click en boton 2");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement