BrU32

JS Toggle Custom Button Opaciry And Show Cookie SRC

Jul 25th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <html>
  2. <body onload="my()"">
  3. <center>
  4. <p id="demo"></p>
  5. <script>
  6. var num=0;
  7. function my() {
  8. document.body.style.background="darkblue";
  9. document.body.style.color="magenta";
  10. var x = document.getElementById("e");
  11. x.style.fontSize = "20px";
  12. x.style.color = "darkblue";
  13. x.style.border="100";
  14. x.style.background="lightblue";
  15. document.body.innerHTML=document.body.innerHTML+(document.cookie);
  16. }
  17. </script>
  18. <button id="e" onclick=";
  19. if(num!=1){
  20. e.style.opacity=1.0
  21. num=1
  22. }else{
  23. e.style.opacity=0.5;
  24. num=0}
  25. my();">Show cookies</button>
  26. </center>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment