diff --git a/05/app.js b/05/app.js new file mode 100644 index 0000000..c122cb3 --- /dev/null +++ b/05/app.js @@ -0,0 +1,32 @@ + + +function dyncolor() { + let color = document.getElementById("tcolor").value; + console.log(color); + document.getElementById("ltext").style.color = color; +} + +function bgcolor() { + let color = document.getElementById("bcolor").value; + console.log(color); + document.getElementById("ltext").style.backgroundColor = color; +} + + +function changeScolor() { + let colorList = document.getElementById("scolor"); //načteme seznam barev + let selectColor = colorList.selectedIndex; //načteme vybraný index (pořadí) + let futureColor = colorList.options[selectColor].value; //načteme hodnotu vybraného indexu + + document.getElementById("ltext").style.color = futureColor; + +} + +function changeFont() { + let fontList = document.getElementById("sfont"); //načteme seznam fontů + let selectFont = fontList.selectedIndex; //načteme vybraný index (pořadí) + let futureFont = fontList.options[selectFont].value; //načteme hodnotu vybraného indexu + + document.getElementById("ltext").style.fontFamily = futureFont; + +} \ No newline at end of file diff --git a/05/index.html b/05/index.html new file mode 100644 index 0000000..93096ff --- /dev/null +++ b/05/index.html @@ -0,0 +1,39 @@ + + + + + + + JS DOM stylizace + + + + + +

JS DOM Stylizace

+

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Hic error unde quas repellat sunt sapiente quos facilis quia recusandae dolores sequi, saepe nostrum corrupti earum dolorem esse doloribus nemo cum!

+
+ + + + +
+ + + + + + + \ No newline at end of file diff --git a/05/style.css b/05/style.css new file mode 100644 index 0000000..9ddb116 --- /dev/null +++ b/05/style.css @@ -0,0 +1,3 @@ +.domblue { + color: red; +} \ No newline at end of file