remove index.ts and package.json
This commit is contained in:
parent
342814c153
commit
6ae83e6662
26
4/index.ts
26
4/index.ts
|
@ -1,26 +0,0 @@
|
||||||
let t = 0;
|
|
||||||
let b1 = <HTMLElement>document.getElementsByClassName("b1")[0],
|
|
||||||
b2 = <HTMLElement>document.getElementsByClassName("b2")[0],
|
|
||||||
b3 = <HTMLElement>document.getElementsByClassName("b3")[0],
|
|
||||||
timer = <HTMLElement>document.getElementsByClassName("timer")[0];
|
|
||||||
function c_timer() {
|
|
||||||
console.log(t);
|
|
||||||
t += 1;
|
|
||||||
if (t == 13) t = 0;
|
|
||||||
if (t < 6) {
|
|
||||||
b3.style["background-color"] = "unset";
|
|
||||||
b1.style["background-color"] = "red";
|
|
||||||
timer.innerHTML = 6-t as string;
|
|
||||||
}
|
|
||||||
else if(t<8){
|
|
||||||
b1.style["background-color"] = "unset";
|
|
||||||
b2.style["background-color"] = "green";
|
|
||||||
timer.innerHTML = 8-t as string;
|
|
||||||
}
|
|
||||||
else if(t<13){
|
|
||||||
b2.style["background-color"] = "unset";
|
|
||||||
b3.style["background-color"] = "yellow";
|
|
||||||
timer.innerHTML = 13-t as string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setInterval(c_timer, 1000);
|
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"name": "tianzhan4",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "Homework for tz",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"author": "Luthics",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"typescript": "^4.8.4"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue