Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- </head>
- <body>
- <h1>test</h1>
- <div id=div1 style="height: 100px; width: 100px; background-color: blue;" onclick="div1_opacity()"> div1 </div>
- <button id=butt1> go </button>
- </body>
- <script>
- function div1_opacity() {
- if(document.getElementById("div1").style.opacity==1)
- document.getElementById("div1").style.opacity=0
- else
- document.getElementById("div1").style.opacity=1;
- }
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement