Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Ejemplo</title>
- </head>
- <body>
- <p id="demo">Contenido a modificar</p>
- <button type="button" onclick="document.getElementById('demo').innerHTML = 'Contenido modificado'">
- Cambio de contenido
- </button>
- <button type="button" onclick="document.getElementById('demo').style.backgroundColor = 'green'">
- Cambio de estilo
- </button>
- <button type="button" onclick="document.getElementById('demo').style.display = 'none'">
- Ocultar el contenido
- </button>
- <button type="button" onclick="document.getElementById('demo').style.display = 'block'">
- Mostrar el contenido
- </button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment