repozitář pro předmět WTL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
1.1 KiB

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