I’m making a very simple version of tic tac toe for my IT class I have everything working except I can’t get the cells in my table to show “X” or “O”. The background changes however the text doesn’t display. here’s a snipet of my script:
if (count%2 == 0)
{
var o = obj
if (o == countray[count])
{
alert(“Can’t Do That”)
}
else
{
o.style.fontSize=”70″
o.style.color=”black”;
o.data = “O”
o.style.background =”yellow”
alert(“Player 1”)
alert(o.id)
count++
countray[count] = o
}
}
else
{
var x = obj
if (x == countray[count])
{
alert(“Can’t Do That”)
}
else
{
x.style.fontSize=”70″
x.style.color=”black”;
x.data=”X”
x.style.background =”cyan” alert(“Player 2”)
alert(x.id)
count++
countray[count] = x
}
}