为什么var a = e.target.innerText不能工作,但是如果我设置var a = e.target,然后执行if(a.innerText == ""),它就能工作。const turn = "X";
e.addEventListener("click", (e) => {
var a = e.target.innerText
到目前为止,它似乎进行得很好,只是我无法获得该按钮具有使用event.target.innerText输入按钮的文本的任何值。its X's turn[Will change this later, so that it is could be anyone's turn at the start]}
{ {