SHARE
TWEET

Untitled

a guest Apr 10th, 2020 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.  
  5. <script>
  6. function div1_opacity() {
  7.     if(document.getElementById("div1").style.opacity==0)
  8.         document.getElementById("div1").style.opacity=1
  9.     else
  10.         document.getElementById("div1").style.opacity=0;
  11. }
  12. </script>
  13.  
  14. </head>
  15.  
  16. <body>
  17.  
  18.     <h1>test</h1>
  19.  
  20.     <div id=div1 style="height: 100px; width: 100px; background-color: blue; opacity: 1;" >   div1  </div>
  21.  
  22.     <button id=butt1 onclick=div1_opacity()> go </button>
  23.  
  24. </body>
  25.  
  26. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top