niske

Untitled

Mar 2nd, 2023
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.  
  5. </head>
  6. <body>
  7. <h1> izgled</h1>
  8. <form id="formular">
  9. <label>Tema</label>
  10. <input type="radio" name="tema" value="svetlo" id="svetla">svetlo
  11. <input type="radio" name="tema" value="tamno" id="tamno">nigga
  12. <br>
  13. <label1>velicina teksta</label1>
  14. <select id="velicina">
  15. <option value="10px">mala</option>
  16. <option value="20px">srednja</option>
  17. <option value="40px">velika</option>
  18.  
  19. </select>
  20. </form>
  21. <p>ahdfkljahskjafhasfhlasfhffasfhasash</p>
  22. <p>dasflihasfkjhasfkuhdaskjfhdasfkjuhdsfkhasdkjfhfdaskh</p>
  23. <script>
  24. let telo= document.body
  25. let formular = document.forms.formular;
  26.  
  27. formular.svrtlo.addEventListener("click",function(){
  28. telo.classList.remove("tamna");
  29. telo.classList.add("svetla");
  30. });
  31. formular.svrtlo.addEventListener("click",function(){
  32. telo.classList.remove("svetla");
  33. telo.classList.add("tamno");
  34. });
  35. formular.velicina.addEventListener("change",function(){
  36. telo.style.fontSize=formular.velicina.value;
  37. })
  38. </script>
  39. </body>
  40. </html>
Add Comment
Please, Sign In to add comment