Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <h1> izgled</h1>
- <form id="formular">
- <label>Tema</label>
- <input type="radio" name="tema" value="svetlo" id="svetla">svetlo
- <input type="radio" name="tema" value="tamno" id="tamno">nigga
- <br>
- <label1>velicina teksta</label1>
- <select id="velicina">
- <option value="10px">mala</option>
- <option value="20px">srednja</option>
- <option value="40px">velika</option>
- </select>
- </form>
- <p>ahdfkljahskjafhasfhlasfhffasfhasash</p>
- <p>dasflihasfkjhasfkuhdaskjfhdasfkjuhdsfkhasdkjfhfdaskh</p>
- <script>
- let telo= document.body
- let formular = document.forms.formular;
- formular.svrtlo.addEventListener("click",function(){
- telo.classList.remove("tamna");
- telo.classList.add("svetla");
- });
- formular.svrtlo.addEventListener("click",function(){
- telo.classList.remove("svetla");
- telo.classList.add("tamno");
- });
- formular.velicina.addEventListener("change",function(){
- telo.style.fontSize=formular.velicina.value;
- })
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment