SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE HTML>
  2. <html lang="pl">
  3. <head>
  4. <meta charset="utf-8">
  5. <style>
  6.     img{
  7.     width:250px;
  8.     height:250px;
  9.     }
  10.     img:nth-of-type(1){
  11.         cursor:pointer;
  12.     }
  13.     #wrapper{
  14.         background-color:black;
  15.     }
  16. </style>
  17. <script>
  18.  
  19. function zmien(){
  20. var obraz = document.getElementById("zmie").src;
  21. if(obraz == "file:///C:/Users/LPawlowski/Desktop/pai%204c/02%20java%20script/05%20modyfikowanie%20strony%20za%20pomoca%20js/1.jpg"){
  22.  document.getElementById("zmie").src="3.jpg";
  23.  document.getElementById("wrapper").style="background-color:black";
  24.  document.getElementById("przycisk").src="1234.jpg"
  25.  }else{
  26.  document.getElementById("zmie").src="1.jpg";
  27.   document.getElementById("wrapper").style="background-color:yellow";
  28.   document.getElementById("przycisk").src="123.jpg"
  29.  }
  30. }
  31. </script>
  32. </head>
  33. <body>
  34. <div id="wrapper">
  35. <img src="123.jpg" alt="wlacznik" onclick="zmien();" id="przycisk">
  36. <img src="1.jpg" alt="zarowka" id="zmie">
  37. </div>
  38.  
  39. </body>
  40. </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