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; }