From 7bc6b230233b58926b9acfca6ffe51685654fbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=A0krab=C3=A1nek?= Date: Fri, 4 Oct 2024 10:28:22 +0200 Subject: [PATCH] 06 js css change --- 06/index.html | 37 +++++++++++++++++++++++++++++++++++++ 06/script.js | 26 ++++++++++++++++++++++++++ 06/style.css | 0 3 files changed, 63 insertions(+) create mode 100644 06/index.html create mode 100644 06/script.js create mode 100644 06/style.css diff --git a/06/index.html b/06/index.html new file mode 100644 index 0000000..7ff2489 --- /dev/null +++ b/06/index.html @@ -0,0 +1,37 @@ + + + + + + JS DOM stylizace + + + +

JS DOM Stylizace

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ullam, aperiam itaque officia natus, beatae ut exercitationem ab voluptatum veniam maxime deserunt at est. Error possimus itaque quis aliquam saepe. Veniam!

+
+ + + + +
+ + + + + + \ No newline at end of file diff --git a/06/script.js b/06/script.js new file mode 100644 index 0000000..238616c --- /dev/null +++ b/06/script.js @@ -0,0 +1,26 @@ +function changeScolor() { + let colorList = document.getElementById("scolor"); + let selectColorIndex = colorList.selectedIndex; + let futureColor =colorList.options[selectColorIndex].value; + + document.getElementById("ltext").style.color = futureColor; +} + +function changeSfont() { + let fontList = document.getElementById("sfont"); + let selectfontIndex = fontList.selectedIndex; + let futurefont =fontList.options[selectfontIndex].value; + document.getElementById("ltext").style.fontFamily = futurefont; +} + +function dynColor() { + let color = document.getElementById("tcolor").value; + console.log(color); + document.getElementById("ltext").style.color = color; +} + +function bColor() { + let color = document.getElementById("bcolor").value; + console.log(color); + document.getElementById("ltext").style.backgroundColor = color; +} \ No newline at end of file diff --git a/06/style.css b/06/style.css new file mode 100644 index 0000000..e69de29