color change function
This commit is contained in:
parent
821319638f
commit
8a26fd7207
1 changed files with 18 additions and 0 deletions
18
script.js
18
script.js
|
@ -1,5 +1,23 @@
|
||||||
const reponse = "train";
|
const reponse = "train";
|
||||||
var word ="";
|
var word ="";
|
||||||
|
const good_letter_color = "#3fbe00";
|
||||||
|
const bad_letter_color = "#BE0000";
|
||||||
|
const mid_letter_coloer = "#BF8200";
|
||||||
|
|
||||||
|
function change_color_good_letter(coord){
|
||||||
|
var case_div = document.getElementById(coord);
|
||||||
|
case_div.style.backgroundColor = good_letter_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
function change_color_bad_letter(coord){
|
||||||
|
var case_div = document.getElementById(coord);
|
||||||
|
case_div.style.backgroundColor = bad_letter_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
function change_color_mid_letter(coord){
|
||||||
|
var case_div = document.getElementById(coord);
|
||||||
|
case_div.style.backgroundColor = mid_letter_color;
|
||||||
|
}
|
||||||
|
|
||||||
function update(x) {
|
function update(x) {
|
||||||
word += x
|
word += x
|
||||||
|
|
Loading…
Reference in a new issue