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.
22 lines
720 B
22 lines
720 B
console.log("index.js spuštěný")
|
|
|
|
function dynColor() {
|
|
let color = document.getElementById("tcolor").value;
|
|
console.log(color)
|
|
document.getElementById("ltext").style.color = color
|
|
}
|
|
|
|
function dynBGColor() {
|
|
let color = document.getElementById("bcolor").value;
|
|
console.log(color)
|
|
document.getElementById("ltext").style.backgroundColor = color
|
|
}
|
|
|
|
function changeSColor() {
|
|
let colorList = document.getElementById("scolor");//načti seznam barev
|
|
let selectColor = colorList.selectedIndex; //načteme vybraný index (pozici)
|
|
let nextColor = colorList.options[selectColor].value; // načteme hodnotu z vybraného indexu
|
|
|
|
document.getElementById("ltext").style.color = nextColor;
|
|
|
|
}
|