fin séance 1 TD3

This commit is contained in:
JunkJumper 2020-02-12 18:36:12 +01:00
parent 5017da42b5
commit 42a7326d48
2 changed files with 12 additions and 11 deletions

View File

@ -17,11 +17,12 @@ function selection(event) {
var vide = document.body.querySelector(".case.vide"); var vide = document.body.querySelector(".case.vide");
if ((maCase.offsetTop == vide.offsetTop && Math.abs(maCase.offsetLeft - vide.offsetLeft == 102)) || if ((maCase.offsetTop == vide.offsetTop && Math.abs(maCase.offsetLeft - vide.offsetLeft == 102)) ||
(maCase.offsetLeft == vide.offsetLeft && Math.abs(maCase.offsetTop - vide.offsetTop == 102)) { (maCase.offsetLeft == vide.offsetLeft && Math.abs(maCase.offsetTop - vide.offsetTop == 102))) {
maCase.setAttribute("class", ".case.vide"); console.log("1");
vide.setAttribute("class", ".case"); maCase.className = "case vide";
} vide.className = "case";
console.log(event.currentTarget.innerText);
var e = event.target;
} }
console.log(event.currentTarget.className + " : " + event.currentTarget.innerText);
var e = event.target;
}

View File

@ -1,5 +1,5 @@
/*<![CDATA[*/ console.log("js linkef");
function init(){ function init() {
console.log("init ok");
} }
/*]]>*/