Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="pt-br">
- <head>
- <title>JavaScript define cor</title>
- <script>
- function defineCor(cor){
- document.querySelector("body").style.backgroundColor = cor;
- }
- </script>
- </head>
- <body>
- <h3>Definindo cor com JavaScript</h3>
- <input type="color" onchange="defineCor(this.value)">
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment