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