Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. </head>
  5. <body>
  6. <script>
  7. function tlo(index)
  8. {
  9. var kolor=document.form1.wybtlo[index].value;
  10. document.getElementById("1").style.background=kolor;
  11. }
  12. function kolczc(index)
  13. {
  14. var kolor=document.form1.kolorczc[index].value;
  15. document.getElementById("1").style.color=kolor;
  16. }
  17. function rozmczc(index)
  18. {
  19. var rozmiar=document.form1.rozm[index].value;
  20. document.getElementById("1").style.fontSize=rozmiar;
  21. }
  22. </script>
  23. <div id="1" style="max-width:100%; height: 100%; outline:black dashed: padding-inline:1px;">
  24. <br>
  25. <form name="form1">
  26. Kolor tła: <select name="wybtlo" onclick="tlo(wybtlo.selectedIndex)">
  27. <option value="blue">Niebieski</option>
  28. <option value="red">Czerwony</option>
  29. <option value="black">Czarny</option>
  30. </select>
  31.  
  32. Kolor czcionki: <select name="kolorczc" onclick="kolorczc(kolorczc.selectedIndex)">
  33. <option value="black">Czarny</option>
  34. <option value="white">Biały</option>
  35. <option value="pink">Różowy</option>
  36. </select>
  37.  
  38. Rozmiar czcionki: <select name="rozm" onclick="rozmczc(rozm.selectedIndex)">
  39. <option value="100%">100%</option>
  40. <option value="130%">130%</option>
  41. <option value="150%">150%</option>
  42. </select>
  43. </form>
  44. </div>
  45. </body>
  46. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement