Advertisement
Guest User

kugelpapst

a guest
Nov 13th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7.  
  8. <title>JOJO's cookies</title>
  9.  
  10.  
  11. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css">
  12.  
  13.  
  14. <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.css">
  15. <script>
  16. function SETcookie() {
  17. document.cookie = "Selected=" + document.getElementById('myList').selectedIndex;
  18. }
  19.  
  20. function GETcookie() {
  21. if (document.cookie) {
  22. eval(document.cookie);
  23. document.getElementById('myList').selectedIndex = Selected;
  24. }
  25. }
  26. </script>
  27. </head>
  28. <body onLoad="GETcookie()"><center>
  29. <select id="myList" onChange="SETcookie()">
  30. <option value="1">Nie wiem</option>
  31. <option value="2">Green chyba</option>
  32. <option value="3">Blue</option>
  33. <option value="4">Red</option>
  34. </select></center>
  35.  
  36.  
  37.  
  38.  
  39. <div class="alert text-center cookiealert" role="alert">
  40. <b>Hej, jestem cookies i nie działam!</b> &#x1F36A; What A Beautiful Duwang <a href="https://cookiesandyou.com/" target="_blank">Oh, You're approaching me?</a>
  41.  
  42. <button type="button" class="btn btn-primary btn-sm acceptcookies" aria-label="Close">
  43. chew
  44. </button>
  45. </div>
  46.  
  47. <script src="https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.js"></script>
  48. <center> <img src="https://www.jing.fm/clipimg/detail/161-1610019_dio-jojobizarreadventure-jojosbizarreadventure-roadroller.png" /> <div>Licznik:</div> <span id="licznik">MUDA: 0</span>
  49. <span id="liczniklocal">Licznik ogólny klikniec: 0</span>
  50. <script>
  51. var licznik = 0;
  52. document.addEventListener("click", function () {
  53. licznik++;
  54. document.getElementById("licznik").textContent = "MUDA: " + licznik;
  55. }, false);
  56. document.getElementById("liczniklocal").textContent = "MUDA ogólne : " + (+localStorage.liczniklocal || 0);
  57.  
  58. document.addEventListener("click", function () {
  59. localStorage.liczniklocal = (+localStorage.liczniklocal || 0) + 1;
  60. document.getElementById("liczniklocal").textContent = "MUDA ogólne: " + localStorage.liczniklocal;
  61. }, false);</script>
  62.  
  63.  
  64. </body>
  65. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement