Created
November 11, 2018 21:19
-
-
Save camilomontoyau/4afb782be2f8987df28885d2d5d636ef to your computer and use it in GitHub Desktop.
react es js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>un título</title> | |
| <meta charset="UTF-8" /> | |
| <style> | |
| .letra-color-azul { | |
| color: blue; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| <!-- script de react importado en la próxima línea --> | |
| <script type="text/javascript" src="https://unpkg.com/react@16.6.1/umd/react.development.js"></script> | |
| <script type="text/javascript"> | |
| const app = document.getElementById('app'); | |
| const button = document.createElement('button'); | |
| button.innerText = 'Soy un botón'; | |
| button.className = "letra-color-azul"; | |
| button.onclick = function btnClick() { | |
| alert("hola soy un alert"); | |
| }; | |
| app.appendChild(button); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment